Answers for "selenium dropdowns"

6

python selenium select dropdown

from selenium import webdriver
from selenium.webdriver.support.ui import Select

driver = webdriver.Firefox()
driver.get('url')

select = Select(driver.find_element_by_id('fruits01'))

# select by visible text
select.select_by_visible_text('Banana')

# select by value 
select.select_by_value('1')
Posted by: Guest on April-14-2020
0

using selenium with a dropdown menu

driver.findElement(By.id("dropdownlistone")).click(); // To click on drop down list
driver.findElement(By.linkText("india")).click(); // To select a data from the drop down list
Posted by: Guest on April-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language