Answer the question
In order to leave comments, you need to log in
How to select an option from a drop down menu with Selenium (Python)?
How to click on "Two" using python selenium?
<select class="my-class">
<option>One</option>
<option>Two</option>
</select>
Answer the question
In order to leave comments, you need to log in
First, click on select, then on XPATH select the desired option
. When you try, what does selenium swear at?
There is a special class https://selenium-python.readthedocs.io/api.html#mo...
from selenium import webdriver
from selenium.webdriver.support.ui import Select
select = Select(driver.find_element_by_class_name('my-class'))
select.select_by_visible_text('Two')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question