views:

383

answers:

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.

  • 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?
+2  A: 

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.

Paul Biggar
Just as a side note, CSS selectors are quicker and can be a lot easer to read
AutomatedTester
@AutomatedTester: I completely agree. But they don't seem to be as powerful.
Paul Biggar