Find dash dropdown elements with selenium (python)

I realized that dash layout elements are different from the traditional UI layout. I am trying to automate testing a dropdown element which would normally be of type “select”. So the selenium syntax and select th value would be:

select = select(driver.find_element(By.XPATH, "...")

I get the error: selenium.common.exceptions.UnexpectedNameTagException: Message: select only works on elements, not on

The layout for the dropdown is as follows:

Thanks for ur help!

Hi @pl_640 and welcome to the Dash community :slight_smile:

Here’s more information on testiing with dash: Dash Testing | Dash for Python Documentation | Plotly

If you would like some examples, it’s helpful to check out the tests in the dash GitHub

1 Like

I have already stumbled across the Github but I didnt find any advice related to dropdown testing with selenium. I would be happy about further advice :slight_smile:

You can find lots of dropdown tests here: dash/components/dash-core-components/tests/integration/dropdown at dev · plotly/dash · GitHub

For me, probably only this snippet would be needed because the source ode of the app cannot/ is not accessed.

However, I wonder, what dash_duo stands for and how to use it in my context. Because I am not defining a method with this parameter that creates a dropdown as my App is already built. The only thing I have is the html file