Because without an actual XPath/CSS parser we'll quickly end up generating
invalid XPaths. Consider for example:
```ruby
browser.element(xpath: './foo | ./bar')
```
I don't think it's worth heading down that rabbit hole for a small performance
gain with a fairly rare use case.
However, if we control the XPath fully, it'd make sense to use XPath indexing -
I'm not sure if we even do that currently. There may be a good reason (and
probably demonstrated by the specs) that I can't remember.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/241#issuecomment-33969878
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development