Home > Back-end >  get buttons with xpath with strange attribute
get buttons with xpath with strange attribute

Time:05-18

in a web page I have to select all the buttons like this :

<button : :disabled="orderedEvents.length === 0"></button>

but with this xpath :

//button[contains(@class, 'isComplete, \'open\'')]

do not works!

CodePudding user response:

You can find attributes that contains colons in the name using @*[name()] and find it's value using .

//button[@*[starts-with(name(),':class') and contains(., \"isComplete, 'open'\")]]
  • Related