Read visible text from an element
Easy30 pts~12 min
- getText
- Assertions
Practice app · Profile Settings
A settings page for clicking, typing, reading text/attributes/CSS and element state.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Read and assert the visible text of status elements.
Your task
- 1Open TEST_URL and read
#status-badge— assert “Active”. - 2Click
#save-button. - 3Read
#save-statusand assert it is “Profile saved”.
Acceptance criteria
- getText() is used
#save-statusreads “Profile saved”- At least 2 assertions pass
Selenium WebDriver 4 · Selenium · Interactions