playwright-selectors - Playwright User-Facing Selectors Guide
Refactor Playwright tests to use accessible, user-facing selectors following priority ladder
Tags
Updated: 2026-03-20Capabilities
Typical Inputs
Typical Outputs
What this skill does
- refactor tests
- write tests
- prioritize locators
- chain filters
- scope locators
- document testId usage
- add semantic markup
Inputs
- Playwright test file
- test code using getByTestId
- selector ambiguity issues
Outputs
- refactored test code
- updated test locators
- removed testId attributes
Requirements
- Playwright framework
- Given/When/Then test structure
