I am trying to make webdriver/browser to be able to process XPATH version 2.0.
Using old version of XPATH is fine, but at certain specific case I will also need to process XPATH version 2.0.
I tried some research regarding this but still no clue.
For example, say I want to get all <a>
elements that contain title
or href
attribute:
# find elements by xpath in older version
driver.find_elements_by_xpath("//a[@title or @href]")
# I want the code to be able to process XPATH version 2.0
driver.find_elements_by_xpath("//a/(@title|@href)")
I expect I can find some configuration (or what browser should I use) to achieve availability of processing XPATH version 2.0.