by testdino-hq
TestDino Playwright Skill: AI-powered guides for Playwright best practices, made by testdino.com.
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/testdino-hq/playwright-skillGuides for using testing skills like playwright-skill.
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.
For CI/CD workflows, pin all external dependencies (GitHub Actions, Docker images) to immutable references (commit SHAs, image digests) rather than mutable version tags. See ci-github-actions.md and docker-and-containers.md for pinning guidance.
getByRole() over CSS/XPath — resilient to markup changes, mirrors how users see the pagepage.waitForTimeout() — use expect(locator).toBeVisible() or page.waitForURL()expect(locator) auto-retries; expect(await locator.textContent()) does notbaseURL in config — zero hardcoded URLs in tests2 in CI, 0 locally — surface flakiness where it matters'on-first-retry' — rich debugging artifacts without CI slowdowntest.extend(), not module-level variablesexpect() calls are fine| What you're doing | Guide | Deep dive |
|---|---|---|
| Choosing selectors | locators.md | locator-strategy.md |
| Assertions & waiting | assertions-and-waiting.md | |
| Organizing test suites | test-organization.md | test-architecture.md |
| Playwright config | configuration.md | |
| Page objects | page-object-model.md | pom-vs-fixtures-vs-helpers.md |
| Fixtures & hooks | fixtures-and-hooks.md | |
| Test data | test-data-management.md | |
| Auth & login | authentication.md | auth-flows.md |
| API testing (REST/GraphQL) | api-testing.md | |
| Visual regression | visual-regression.md | |
| Accessibility | accessibility.md | |
| Mobile & responsive | mobile-and-responsive.md | |
| Component testing | component-testing.md | |
| Network mocking | network-mocking.md | when-to-mock.md |
| Forms & validation | forms-and-validation.md | |
| File uploads/downloads | file-operations.md | file-upload-download.md |
| Error & edge cases | error-and-edge-cases.md | |
| CRUD flows | crud-testing.md | |
| Drag and drop | drag-and-drop.md | |
| Search & filter UI | search-and-filter.md |
For frontend engineers writing the app — make components reliably locatable by tests and AI agents.
| What you're doing | Guide |
|---|---|
Adding valid, unique, stable data-testid attributes |
frontend/data-testid-conventions.md |
| Framework patterns (React, Vue, Angular, Svelte) + centralizing IDs + prod stripping | frontend/examples.md |
| What you're doing | Guide |
|---|---|
| Ticket / acceptance criteria → test cases, risk ranking, test plan | test-design.md |
| Failing test → bug report; app bug vs test bug vs flake | bug-reports.md |
| Manual test cases / CSV export → Playwright specs | manual-to-automated.md |
| Review Playwright tests or a PR | test-review.md |
| Problem | Guide |
|---|---|
| General debugging workflow | debugging.md |
| Specific error message | error-index.md |
| Flaky / intermittent tests | flaky-tests.md |
| Quarantine or select tests from a reporter | dynamic-test-selection.md |
| Common beginner mistakes | common-pitfalls.md |
Debug a trace.zip from the terminal / with an agent |
trace-analysis.md |
| Generate or auto-heal tests with Playwright Test Agents | test-agents.md |
| Framework | Guide |
|---|---|
| Next.js (App Router + Pages Router) | nextjs.md |
| React (Vite) | react.md |
| Vue 3 / Nuxt | vue.md |
| Angular | angular.md |
| From | Guide |
|---|---|
| Cypress | from-cypress.md |
| Selenium / WebDriver | from-selenium.md |
| Question | Guide |
|---|---|
| Which locator strategy? | locator-strategy.md |
| E2E vs component vs API? | test-architecture.md |
| Mock vs real services? | when-to-mock.md |
| POM vs fixtures vs helpers? | pom-vs-fixtures-vs-helpers.md |
| Topic | Guide |
|---|---|
| GitHub Actions | ci-github-actions.md |
| GitLab CI | ci-gitlab.md |
| CircleCI / Azure DevOps / Jenkins | ci-other.md |
| Parallel execution & sharding | parallel-and-sharding.md |
| Docker & containers | docker-and-containers.md |
| Reports & artifacts | reporting-and-artifacts.md |
| Code coverage | test-coverage.md |
| Global setup/teardown | global-setup-teardown.md |
| Multi-project config | projects-and-dependencies.md |
| Topic | Guide |
|---|---|
| Multi-user & collaboration | multi-user-and-collaboration.md |
| WebSockets & real-time | websockets-and-realtime.md |
| Browser APIs (geo, clipboard, permissions) | browser-apis.md |
| iframes & Shadow DOM | iframes-and-shadow-dom.md |
| Canvas & WebGL | canvas-and-webgl.md |
| Service workers & PWA | service-workers-and-pwa.md |
| Electron apps | electron-testing.md |
| Browser extensions | browser-extensions.md |
| WebMCP agent tools | webmcp-testing.md |
| Security testing | security-testing.md |
| Performance & benchmarks | performance-testing.md |
| i18n & localization | i18n-and-localization.md |
| Multi-tab & popups | multi-context-and-popups.md |
| Clock & time mocking | clock-and-time-mocking.md |
| Third-party integrations | third-party-integrations.md |
| What you're doing | Guide |
|---|---|
| CLI browser interaction | playwright-cli/SKILL.md |
| Core commands (open, click, fill, navigate) | core-commands.md |
| Network mocking & interception | request-mocking.md |
| Running custom Playwright code | running-custom-code.md |
| Multi-session browser management | session-management.md |
| Cookies, localStorage, auth state | storage-and-auth.md |
| Test code generation from CLI | test-generation.md |
| Tracing and debugging | tracing-and-debugging.md |
| Screenshots, video, PDF | screenshots-and-media.md |
| Device & environment emulation | device-emulation.md |
| Complex multi-step workflows | advanced-workflows.md |
Examples are TypeScript; most core guides also show JavaScript. When the project uses .js files or has no tsconfig.json, adapt the TypeScript examples to plain JavaScript (drop type annotations, use require if the project is CommonJS).
██████╗ ██╗ █████╗ ██╗ ██╗██╗ ██╗██████╗ ██╗ ██████╗ ██╗ ██╗████████╗
██╔══██╗██║ ██╔══██╗╚██╗ ██╔╝██║ ██║██╔══██╗██║██╔════╝ ██║ ██║╚══██╔══╝
██████╔╝██║ ███████║ ╚████╔╝ ██║ █╗ ██║██████╔╝██║██║ ███╗███████║ ██║
██╔═══╝ ██║ ██╔══██║ ╚██╔╝ ██║███╗██║██╔══██╗██║██║ ██║██╔══██║ ██║
██║ ███████╗██║ ██║ ██║ ╚███╔███╔╝██║ ██║██║╚██████╔╝██║ ██║ ██║
╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
███████╗██╗ ██╗██╗██╗ ██╗
██╔════╝██║ ██╔╝██║██║ ██║
███████╗█████╔╝ ██║██║ ██║
╚════██║██╔═██╗ ██║██║ ██║
███████║██║ ██╗██║███████╗███████╗
╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝
Production-tested Playwright guides for E2E, API, component, visual, accessibility, and security testing, plus CI/CD, CLI automation, trace-report debugging, page objects, and migration. 79 guides with TypeScript examples throughout and JavaScript in most core guides.
These are Agent Skills — Markdown guides an AI coding agent loads on demand. Install them with the skills CLI and your agent pulls the right guide when you ask it to write, debug, or scale Playwright tests. SKILL.md is the canonical index the agent reads, including the Golden Rules and architecture-decision guides.
Playwright 1.65 coverage: the built-in -exclusive- test lock, the failures reporter and onlyFailures for html/json/junit reports, running the test runner under Bun (bunx --bun playwright test), testRun.mode() for quarantining serial groups, cdpSession.send() timeouts, test.skip('reason'), and PLAYWRIGHT_TRANSFORM_CACHE_DIR; playwright-cli isolated contexts for two signed-in users in one session, --all for console and requests, find --max-results, scoped cookie-delete, redactUrlParams, locateOnlyVisible, and named extension sessions. Breaking changes flagged where they bite: page-object field initializers under useDefineForClassFields, actions waiting for non-inert elements, sharded runs failing with "No tests found", RFC 6265 cookie matching, params appended to the URL query, proxy credentials no longer sent to websites, unrendered text dropped from aria snapshots, stylesheet imports in tests, and Node.js 20 support ending.
From 1.63: test lock for serializing contention on a shared resource, locator.visible() replacing the :visible pseudo-class, aria and screen snapshots in traces (snapshots: { dom, aria, screen }), --add-reporter for appending rather than replacing reporters, the perfetto reporter, typed request.get<User>(), and ariaSnapshotJSON(). From 1.62: reporter.preprocess() for selecting tests before execution, retryStrategy: 'isolated', WebP screenshots with a quality parameter, AbortSignal on actions and assertions, locator.waitForFunction(), apiResponse.timing(), and the stories-and-galleries component testing model that replaces the deprecated experimental CT packages. A dedicated dynamic-test-selection.md guide covers driving quarantine from an external flakiness API.
Add every skill pack to your project:
npx skills add testdino-hq/playwright-skill
Or add individual packs:
npx skills add testdino-hq/playwright-skill/core
npx skills add testdino-hq/playwright-skill/frontend
npx skills add testdino-hq/playwright-skill/qa
npx skills add testdino-hq/playwright-skill/ci
npx skills add testdino-hq/playwright-skill/pom
npx skills add testdino-hq/playwright-skill/migration
npx skills add testdino-hq/playwright-skill/playwright-cli
| Pack | Guides | What's covered |
|---|---|---|
| core | 50 | Locators, assertions, fixtures, auth, API testing, network mocking, visual regression, accessibility, debugging, trace-report analysis, framework recipes, architecture decisions |
| qa | 4 | For QA engineers: test case design from requirements, bug reports from failing tests, manual-to-automated conversion, test review |
| frontend | 2 | For frontend engineers: adding valid, unique, stable data-testid attributes (naming, list uniqueness, stability) + React/Vue/Angular/Svelte patterns |
| ci | 9 | GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, sharding, reporting, coverage |
| playwright-cli | 10 | CLI browser automation, screenshots, tracing, session management, device emulation |
| pom | 2 | Page Object Model patterns, POM vs fixtures vs helpers |
| migration | 2 | Migrating from Cypress, migrating from Selenium |
The patterns every guide assumes (full list with rationale in SKILL.md):
getByRole() over CSS/XPath — resilient to markup changespage.waitForTimeout() — use web-first assertions or page.waitForURL()baseURL in config — zero hardcoded URLs in testsThe foundation: writing, debugging, and maintaining reliable tests. New to Playwright? Start with locators.md, assertions-and-waiting.md, and fixtures-and-hooks.md.
| Guide | Description |
|---|---|
| locators.md | Selector strategies — getByRole, getByText, getByTestId |
| locator-strategy.md | Choosing a locator strategy and trade-offs |
| assertions-and-waiting.md | Web-first assertions, auto-retry, waiting patterns |
| fixtures-and-hooks.md | test.extend(), setup/teardown, worker-scoped fixtures |
| configuration.md | playwright.config.ts — projects, timeouts, reporters, web server |
| test-organization.md | File structure, tagging, test.describe, test filtering |
| test-data-management.md | Factories, seeding, cleanup strategies |
| authentication.md | Storage state reuse, multi-role auth, session management |
| auth-flows.md | Login, OAuth, and multi-step auth flows |
| api-testing.md | REST and GraphQL testing with request fixture |
| network-mocking.md | Route interception, HAR replay, response modification |
| when-to-mock.md | When to mock vs hit real services |
| forms-and-validation.md | Form fills, validation, error states, multi-step wizards |
| crud-testing.md | Create / read / update / delete flow testing |
| search-and-filter.md | Search and filter UI testing |
| drag-and-drop.md | Drag-and-drop interactions |
| file-operations.md | File handling in tests |
| file-upload-download.md | Upload and download flows |
| error-and-edge-cases.md | Error states and edge-case coverage |
| visual-regression.md | Screenshot comparison, thresholds, masking dynamic content |
| accessibility.md | axe-core integration, ARIA assertions, a11y auditing |
| component-testing.md | Component tests with the stories-and-galleries mount() model (1.62+) |
| mobile-and-responsive.md | Device emulation, viewport testing, touch interactions |
| Guide | Description |
|---|---|
| debugging.md | Trace viewer, PWDEBUG, UI mode, headed + slow-mo |
| test-agents.md | Playwright Test Agents: plan, generate and heal tests with an AI tool; when to use playwright-cli or MCP instead |
| trace-analysis.md | Debug a trace.zip from the terminal with the npx playwright trace CLI — agent-native, decision trees, failure playbooks |
| error-index.md | Common error messages and how to fix them |
| flaky-tests.md | Root causes, retry strategies, stabilization patterns |
| dynamic-test-selection.md | Select or quarantine tests at runtime with reporter.preprocess() and an external flakiness API |
| common-pitfalls.md | Top beginner mistakes and how to avoid them |
| Question | Guide |
|---|---|
| E2E vs component vs API? | test-architecture.md |
| Which locator strategy? | locator-strategy.md |
| Mock vs real services? | when-to-mock.md |
| POM vs fixtures vs helpers? | [pom-vs-fixtures-vs-helpers |
playwright-skill is an open-source testing skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by testdino-hq. TestDino Playwright Skill: AI-powered guides for Playwright best practices, made by testdino.com. It has 428 GitHub stars.
playwright-skill's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/testdino-hq/playwright-skill" and add it to your Claude Code skills directory (see the Installation section above). playwright-skill ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
Yes. AgentsLLM lists many other Testing skills you can browse and compare side by side. Open the Testing category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh playwright-skill against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars