Selenium WebDriver 4

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.

Test URL
/lab/qa-automation-read-visible-text-from-an-element

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

Objective

Read and assert the visible text of status elements.

Your task

  1. 1Open TEST_URL and read #status-badge — assert “Active”.
  2. 2Click #save-button.
  3. 3Read #save-status and assert it is “Profile saved”.

Acceptance criteria

  • getText() is used
  • #save-status reads “Profile saved”
  • At least 2 assertions pass

Selenium WebDriver 4 · QA Automation · Interactions