Check if an element is selected
Medium70 pts~25 min
- Element state
- isSelected
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
Read the selection state of radios and checkboxes before and after changing them.
Your task
- 1Open TEST_URL and assert
#plan-basicis selected and#plan-prois not. - 2Click
#plan-proand assert it is selected and#plan-basicis not. - 3Assert
#termsis not selected, click it, then assert it is.
Acceptance criteria
- isSelected is used
#plan-prois checked#termsis checked- At least 4 assertions pass
Selenium WebDriver 4 · Selenium · Interactions