I was wondering if there was a way to find an element on a webpage based on the value attribute.
<option value="abc">Some text here</option>
<option value="bcd">Some text here</option>
I figured I could just create a list of WebElements based on the tag name and traverse each one using .getAttribute("value"), but I was wondering if there was a more effective way of doing this similar to the way you can find an element based on its text using:
driver.findElement(By.xpath("//*[contains(text(), '" + term + "')]"))