Skip to content

v3.1.0 — Accessibility-First Locators

Choose a tag to compare

@shossain786 shossain786 released this 26 Jun 00:46
· 99 commits to master since this release

Playwright-style accessibility-first locators on BaseTest and BasePage — they target the accessibility tree the user perceives instead of brittle CSS/DOM structure, so tests survive redesigns.

  • getByRole, getByText, getByLabel, getByPlaceholder, getByTestId, getByAltText, getByTitle — all flow through the existing auto-wait Locator chain (no Thread.sleep, no explicit waits)
  • getByRole(Role) — 38 WAI-ARIA roles, matching implicit HTML elements (<button>, <a href>, <h1>…) and explicit role="…"; refine with .withName("Submit") and .withLevel(1)
  • Case-insensitive substring by default, exact opt-in via .exact()
  • toBy() escape hatch returns the synthesized Selenium By
  • Configurable test-id attribute (locators.testIdAttribute, default data-testid)

See CHANGELOG.md for details.