Selenium WebDriver 4

Find an element by link text

Easy30 pts~12 min
  • Locators
  • By.linkText
Practice app · Practice Catalog

A product catalog with ids, names, classes, links, data-testids and duplicate buttons for locator practice.

Test URL
/lab/qa-automation-find-an-element-by-link-text

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

Objective

Follow a link using its exact visible text.

Your task

  1. 1Open TEST_URL.
  2. 2Find the link with the exact text “Contact support” and click it.
  3. 3Assert the current URL ends with “#/support”.

Acceptance criteria

  • The link is located with By.linkText
  • The final URL contains “#/support”
  • At least 1 assertion passes

Selenium WebDriver 4 · QA Automation · Locators & the DOM