尝试查找元素时出现以下错误。我的查找方法如下。
public Element FindMenuItem(string menuItemName)
{
var menuItem = Element(Find.ByText(menuItemName));
var cells = ((ElementContainer<Element>)(menuItem)).TableCells;
return cells.Count > 0 ? cells.First() : menuItem;
}
错误:
WatiN.Core.Exceptions.WatiNException:无法找到元素,因为没有可用的元素查找器。