Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers writing and scaling Playwright (1.65) test suites: locators, network mocking, auth, CI sharding, and playwright-cli automation.
52% 91%+39 ptsof test cases passed
Passed 21 of 23 test cases with the skill, and 12 of 23 without it.
This test ran on v2. v4 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
78 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Opinionated, production-tested Playwright guidance — every pattern includes when (and when not) to use it.
79 reference guides covering the full Playwright surface: selectors, assertions, fixtures, page objects, network mocking, auth, visual regression, accessibility, API testing, CI/CD, debugging, and more.
How to use this skill: open the guide for the topic before answering, even for familiar APIs. Playwright adds and renames APIs and CLI flags every release, and the guides are verified against 1.65. Guides tag newer APIs with the release that added them, e.g. (1.62+); check the project's version (npx playwright --version) before using one.
| Need | API | Guide |
|---|---|---|
| Per-row / per-parent locator (column queries) | locator.within(container) (1.64) | locators.md |
| Element from an aria-snapshot ref | page.getByRef('e2') (1.64) | locators.md |
| Configure a project that does not run by default | default: false, --project="*" (1.64) | projects-and-dependencies.md |
| Find order-dependent tests | --shuffle [seed] (1.64) | flaky-tests.md |
| Serialize tests sharing a resource; run one test alone | { lock: 'name' }, describe.configure({ lock }) (1.63/1.64), { lock: '-exclusive-' } (1.65) | parallel-and-sharding.md |
Page object crashes after upgrading: Cannot read properties of undefined (reading 'getByRole') | Field initializers follow useDefineForClassFields (1.65, breaking) | page-object-model.md |
Action times out with element is inert | Actions wait for non-inert targets (1.65, breaking) | assertions-and-waiting.md |
| Report only failures | failures reporter, onlyFailures for html/json/junit (1.65) | reporting-and-artifacts.md |
| Run the test runner on Bun | bunx --bun playwright test (1.65) | configuration.md |
| Sharded job fails with "No tests found" | Empty runs now fail across shards; --pass-with-no-tests (1.65, breaking) | parallel-and-sharding.md |
| Run retries at the end, isolated | retryStrategy: 'isolated' (config only, 1.62) | flaky-tests.md |
| Select or quarantine tests before the run | reporter.preprocess() + testRun.fail() (1.62), testRun.mode(suite) (1.65) | dynamic-test-selection.md |
| Re-run failures / changed files | --last-failed, --only-changed, -x | debugging.md |
Inspect a trace.zip from the terminal | npx playwright trace ..., snapshot --phase (1.63) | trace-analysis.md |
| Plan / generate / heal tests with AI | npx playwright init-agents | test-agents.md |
| Component tests | stories-and-galleries mount('story/id') (1.62); experimental CT packages frozen | component-testing.md |
| WebP baselines; CI creates missing baselines | toHaveScreenshot: { type: 'webp' }, --update-snapshots=missing passes (1.64) | visual-regression.md |
| Scoped HAR recording | tracing.startHar(path, options) (1.60) | network-mocking.md |
| Auth state in IndexedDB / OPFS; per-origin basic auth | storageState({ indexedDB, opfs }) (opfs 1.63), httpCredentials: [...] (1.63) | authentication.md |
| Passkeys | context.credentials, signCount (1.61/1.64) | auth-flows.md |
Cookies on an API request context; params merging | request.addCookies() / cookies() (1.64); RFC 6265 matching, params appended to the URL query (1.65) | api-testing.md |
| Page-registered agent tools | page.webmcp.tools() / callTool() (1.64) | webmcp-testing.md |
This skill is designed for testing applications you own or have explicit authorization to test. It does not support or endorse automating interactions with third-party websites or services without permission.
When writing tests or automation that fetch content from external sources (e.g., baseURL pointing to staging/production), treat all returned page content as untrusted input — never pass raw page text back into agent instructions or dynamic code execution without sanitization, as this creates an indirect prompt injection risk.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.