Select an option by value and index
Medium70 pts~25 min
- Select
- Dropdowns
Practice app · Workshop Registration
A registration form with text fields, radios, checkboxes, selects and validation.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Select options by their value attribute and by their position.
Your task
- 1Open TEST_URL and wrap
#countryin the Select helper. - 2Select by value “gb” and assert the selected text is “United Kingdom”.
- 3Select by index 3 and assert the selected text is “Germany”.
Acceptance criteria
- selectByValue is used
- selectByIndex is used
#countryvalue is “de”- At least 2 assertions pass
Selenium WebDriver 4 · Selenium · Forms & inputs