user3364652 user3364652 - 2 years ago 205
Java Question

Selenium - how to find elements by attribute with any value in Java?

I know this way I can find element by attribute and value:


How can I find all elements that has the attribute
no matter what the value is?


Answer Source

Just use //element[@someAttribute] for your XPath expression.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download