Find an element by partial link text
Easy30 pts~12 min
- Locators
- By.partialLinkText
Practice app · Practice Catalog
A product catalog with ids, names, classes, links, data-testids and duplicate buttons for locator practice.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Follow a link using only part of its visible text.
Your task
- 1Open TEST_URL.
- 2Find the link whose text contains “Shipping” (the footer “Shipping policy” link) and click it.
- 3Assert the current URL ends with “#/shipping”.
Acceptance criteria
- The link is located with By.partialLinkText
- The final URL contains “#/shipping”
- At least 1 assertion passes
Selenium WebDriver 4 · QA Automation · Locators & the DOM