I’m trying to set a value to a dcc.Dropdown with dash_duo but I already fail at the previous step:
import dash
from dash import dcc
def test_001_dropdown(dash_duo):
app = dash.Dash(__name__)
app.layout = dcc.Dropdown(
id='my-dropdown',
options=[
{'label': 'Banana', 'value': 'Banana'},
{'label': 'Apple', 'value': 'Apple'},
{'label': 'Orange', 'value': 'Orange'}],
value='Apple')
dash_duo.start_server(app)
dash_duo.wait_for_text_to_equal('#my-dropdown', 'Apple', timeout=1)
It fails quite dubious:
FAILED dropdown_test.py::test_001_dropdown - selenium.common.exceptions.TimeoutException: Message: text -> Apple not found within 1s, found: Apple
There is defiantly no white-space in between, I swear!