Handle a searchable autocomplete
Hard120 pts~45 min
- Autocomplete
- Dynamic lists
Practice app · UI Widgets Lab
Native alerts, confirm and prompt dialogs, a modal, a cookie banner, custom dropdown, autocomplete, date picker and tooltip.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Type a partial city, wait for suggestions and pick the right one.
Your task
- 1Open TEST_URL and type “Bo” into
#autocomplete-input. - 2Wait for
#autocomplete-list lisuggestions and assert both “Boston” and “Lisbon” appear. - 3Click the suggestion “Lisbon”.
- 4Assert
#autocomplete-resultreads “Selected: Lisbon” and the input value is “Lisbon”.
Acceptance criteria
#autocomplete-inputholds “Lisbon”#autocomplete-resultreads “Selected: Lisbon”- At least 2 assertions pass
Selenium WebDriver 4 · Selenium · Dropdowns, alerts & popups