我可以用Firefox和硒xpath 2.0吗? [英] Can I use xpath 2.0 with firefox and selenium?
本文介绍了我可以用Firefox和硒xpath 2.0吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到其他问题提到xpath 2.0,这显然简化了字符串表达式。我使用Firefox 3.5.5和Selenium 1.0.1。
I saw other questions referring to xpath 2.0, which apparently simplifies string expressions. I'm using Firefox 3.5.5 and selenium 1.0.1.
- 如何检查我的Firefox和Selenium版本是否支持它?
- Selenium是否遵循Firefox的内置Xpath实现? 在这种情况下,如果我开始使用另一个(也许是较老的)selenium浏览器,我会遇到预期xpath 2.0的问题吗?
- How can I check if my versions of Firefox and Selenium support it?
- Does Selenium defer to Firefox's built-in Xpath implementation?
- In that case, if I start using another (perhaps older) browser with selenium, will I run into problems by expecting xpath 2.0?
推荐答案
默认情况下,selenium使用浏览器自带的XPath版本。你可以使用Selenium自带的一个版本,用JavaScript编写。这看起来实现了XPath 1.0,基于对源代码的观察。
By default, selenium uses the "native" version of XPath that comes with the browser. You can make it use a version that comes with Selenium, written in JavaScript. This seems to implement XPath 1.0, based on glancing at the source.
这篇关于我可以用Firefox和硒xpath 2.0吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文