1

我找到了可以与 Selenium 一起使用的wicked-good-xpath 。它可以更快地找到 XPath。

但我不知道如何在 Selenium WebDriver 和 C# 中使用它?

你能给我一些示例代码吗?

提前致谢。

4

1 回答 1

1

Selenium already uses it in the IEDriver:

https://code.google.com/p/selenium/source/browse/cpp/IEDriverServer/CHANGELOG (See version v2.26.0.1)

An XPath library is only used as a fall back when the browser doesn't have a native XPath implementation (I'm pretty sure IE is the only one that doesn't have a native implementation).

A native implementation will always be the fastest.

于 2013-05-02T13:49:19.823 回答