Selenium webdriver python, cannot find by value?
10,709
You can use xpath for identification of elements in such cases,
browser.find_element_by_xpath("//input[@value='1']")
For a better understanding of how xpaths work, you can refer the below link http://www.toolsqa.com/selenium-webdriver/choosing-effective-xpath/
Author by
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
I'm trying to select one of three checkboxes on a page but the source code for them looks like this:
<input type="radio" name="Option" value="1"> <input type="radio" name="Option" value="2"> <input type="radio" name="Option" value="3">
So the only thing differentiating them is value, but there is no find_element_by_value. How would I go about switching between these 3 checkboxes?