python3 selenium select an option from drop down code example
Example 1: 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.select_by_visible_text('Banana')
select.select_by_value('1')
Example 2: python selenium dropdown without select
Dropdown_Element = driver.find_element(By.XPATH, "//*[text()='BRA']").click()
actions = ActionChains(driver)
actions.click(on_element=Dropdown_Element)
time.sleep(2)
actions.perform()