Playwright Expert guides Claude through browser test work: pick the user flows to cover, configure Playwright, write tests with the Page Object Model and auto-waiting, debug failures with traces, and add the suite to CI.
The skill includes a role-based versus CSS selector comparison, a page object with a login spec, and a five-step routine for flaky tests that ends with a repeat-each run to confirm stability.
What You Get
- A five-step workflow from flow analysis to CI integration
- Examples for role-based locators, a LoginPage page object with a spec file and a flaky-test debugging routine
- Reference files for selectors, the Page Object Model, API mocking, configuration and debugging flaky tests
- Rules that forbid waitForTimeout, CSS class selectors, shared state between tests and unexplained first or nth calls
- Output templates for page objects, test files, fixtures and configuration advice
Common Use Cases
- Writing a login and dashboard test suite with page objects
- Tracking down a flaky test with the trace viewer
- Mocking API routes in browser tests
- Setting up playwright.config.ts with traces, screenshots and reporters
- Adding visual regression checks and a CI job
What Makes It Unique
Its debugging routine is concrete: run with traces on first retry, re-run with retries, open the trace viewer, replace arbitrary waits with element-state waits and confirm with ten repeated runs. Selector rules put role and label locators first and ban brittle class selectors.
Under The Hood
The skill is instructions and reference markdown that Claude loads by topic; it ships no scripts. Following it, Claude writes test, page object and config files in your project and runs npx playwright test, show-trace and repeat-each commands, which launch browsers that load the pages and URLs under test. It does not call outside services itself.