2

尝试查找元素时出现以下错误。我的查找方法如下。

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:无法找到元素,因为没有可用的元素查找器。

4

1 回答 1

1

这是 Watin 的一个已知错误,获取最新版本,它应该被修复。链接到下面的错误。

http://sourceforge.net/p/watin/bugs/176/

于 2012-10-03T21:14:57.797 回答