Selenium WebDriver 4

Check if an element is displayed

Easy30 pts~12 min
  • Visibility
  • isDisplayed
Practice app · Profile Settings

A settings page for clicking, typing, reading text/attributes/CSS and element state.

Test URL
/lab/selenium-check-if-an-element-is-displayed

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

Objective

Assert an element is present but hidden, then displayed after revealing it.

Your task

  1. 1Open TEST_URL.
  2. 2Assert #hidden-panel exists but is not displayed.
  3. 3Click #reveal-button.
  4. 4Assert #hidden-panel is displayed and reads “Advanced settings”.

Acceptance criteria

  • isDisplayed is used
  • #hidden-panel is visible at the end
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Interactions