I want to get the Xpath selector for classname(.class) . So basically, i want to know how I can select [attr~=value]
So if i have an element
<div class="class1 class2 class3"></div>
<div class="class1"></div>
I want to select .class1, it should return both the divs. [@class='class1'] doesn't work since it won't select the first div.
That trick should only find "class1":
//div[contains(concat(' ',normalize-space(@class),' '),' class1 ')]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With