Python Selenium Find Element by Name
19,639
find_element_by_name()
method would fit here:
driver.find_element_by_name("quantity")
Comments
-
fightstarr20 almost 2 years
I am using Python Selenium and am trying to select in input box that does not have an ID
<div class="form-group"><input type="email" class="form-control" name="quantity" placeholder="Type a quantity"></div> inputElement = driver.find_element_by_id("quantity")
What is the best way to select this element, by name?
-
Padraic Cunningham about 8 yearsThe answer is almost in the title ;)
-
Leonardo Scotti about 2 yearsnow this is deprecated, use ind_element(by=By.NAME, value=name) instead