evaluate all XPaths with selenium

  • 1 Replies
  • 1229 Views
evaluate all XPaths with selenium
« on: August 02, 2016, 19:05:07 pm »
Can selenium evaluate all elements that may match a given Xpath?

If my page has a list of buttons, i would like to get them all with //button and check that they don't have 'disabled' attribute before clicking on them

Re: evaluate all XPaths with selenium
« Reply #1 on: August 07, 2016, 16:48:30 pm »
try constructing an xpath that will return all buttons without the 'disabled' attribute:

Code
"//button[not(@disabled)]"

 

Sitemap 1 2 3 4 5 6 7 8