Selenium WebDriver 4

Open and select a custom dropdown

Medium70 pts~25 min
  • Custom dropdowns
  • ARIA roles
Practice app · UI Widgets Lab

Native alerts, confirm and prompt dialogs, a modal, a cookie banner, custom dropdown, autocomplete, date picker and tooltip.

Test URL
/lab/selenium-open-and-select-a-custom-dropdown

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Operate a dropdown built from a button and a listbox, where the Select helper does not work.

Your task

  1. 1Open TEST_URL and assert #custom-dropdown-value reads “Choose a framework”.
  2. 2Click #custom-dropdown and wait for #custom-dropdown-menu.
  3. 3Click the [role=option] whose text is “Playwright”.
  4. 4Assert #custom-dropdown-value reads “Playwright”.

Acceptance criteria

  • #custom-dropdown-value reads “Playwright”
  • #custom-dropdown-menu closes after selection
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Dropdowns, alerts & popups