I realized that dash elements layout are different from the traditional UI layout. I am trying to automate testing on a dropdown element which normally would be of type “slelect”. So the selenium syntax to click on the dropdown and select the value would be as follows
select = Select(driver.find_element(By.XPATH, '//*[@id="dropdown-0"]/div'))
#select by visible text
select.select_by_visible_text('Manufacturing')
I found a solution with the help of this repo from 2019:
to choose OPTION in DROPDOWN_NAME use this:
# open dropdown
dropdown = dash_duo.driver.find_element_by_css_selector("div#DROPDOWN_NAME")
dropdown.click()
# chose option
menu = dropdown.find_element_by_css_selector("div.Select-menu-outer")
options = menu.find_elements_by_css_selector("div.VirtualizedSelectOption")
for option in options:
if option.text == 'OPTION':
option.click()