python selenium dropdown without select

Solutions on MaxInterview for python selenium dropdown without select by the best coders in the world

showing results for - "python selenium dropdown without select"
Hadrien
01 Sep 2017
1# Just found a very simple solution for this annoying problem
2# Been looking around for days just to solve it, Selecting dropdowns without Select class
3
4# Find your dropdown element by the following, finds the element in the dropdown named BRA
5Dropdown_Element = driver.find_element(By.XPATH, "//*[text()='BRA']").click()
6
7# Store the ActionChains class inside the actions variable
8actions = ActionChains(driver)
9
10# Click on the element using the click(on_element=)
11actions.click(on_element=Dropdown_Element)
12time.sleep(2)
13actions.perform()
14
15# Hopes this helped :)