locator
An object in a test that describes how to find an element on the page, such as “the button named Submit”.
In more detail
Locators that describe elements the way users see them, by role and name, survive styling changes. Locators that depend on CSS classes or page structure break easily.
Related terms
- Playwright — Microsoft's open-source tool for automating Chromium, Firefox and WebKit browsers, widely used for end-to-end and visual tests.
- ARIA — The W3C standard of HTML attributes, such as role and aria-expanded, that tell assistive technology what a custom widget is and what state it is in.
- CSS — The language that describes how web pages look: colours, fonts, spacing, layout and animation.
- XPath — A query language for picking parts of an XML or HTML document by their position in the tree.
Taught in
- End-to-End Testing with Playwright: Multi-Tier Suites — Production Full-Stack Engineering