Anssol
Back to Skills
Development

Playwright (Testdino)

Agent-ready Playwright skill with structured workflows and MCP-compatible setup.

testingplaywrightbrowser
██████╗ ██╗      █████╗ ██╗   ██╗██╗    ██╗██████╗ ██╗ ██████╗ ██╗  ██╗████████╗
██╔══██╗██║     ██╔══██╗╚██╗ ██╔╝██║    ██║██╔══██╗██║██╔════╝ ██║  ██║╚══██╔══╝
██████╔╝██║     ███████║ ╚████╔╝ ██║ █╗ ██║██████╔╝██║██║  ███╗███████║   ██║
██╔═══╝ ██║     ██╔══██║  ╚██╔╝  ██║███╗██║██╔══██╗██║██║   ██║██╔══██║   ██║
██║     ███████╗██║  ██║   ██║   ╚███╔███╔╝██║  ██║██║╚██████╔╝██║  ██║   ██║
╚═╝     ╚══════╝╚═╝  ╚═╝   ╚═╝    ╚══╝╚══╝ ╚═╝  ╚═╝╚═╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝

███████╗██╗  ██╗██╗██╗     ██╗
██╔════╝██║ ██╔╝██║██║     ██║
███████╗█████╔╝ ██║██║     ██║
╚════██║██╔═██╗ ██║██║     ██║
███████║██║  ██╗██║███████╗███████╗
╚══════╝╚═╝  ╚═╝╚═╝╚══════╝╚══════╝
<p align="left"> <picture> <source srcset="https://testdino.com/images/logo-icon-white.svg" media="(prefers-color-scheme: dark)" /> <source srcset="https://testdino.com/images/logo-icon-black.svg" media="(prefers-color-scheme: light)" /> <img src="https://testdino.com/images/logo-icon-black.svg" width="24" height="24" alt="TestDino Logo" align="center" /> </picture> by <a href="https://testdino.com">testdino.com</a> — Purpose built for debugging, managing, and improving Playwright tests with AI </p>

Playwright Skill Guides

License: MIT Playwright Guides

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.64 coverage: locator.within() for combining a target and a container locator (with per-parent nth() for column queries), WebMCP testing via page.webmcp.tools() / callTool() in a dedicated webmcp-testing.md guide, --shuffle for exposing order-dependent tests, default: false projects with --project="*" and config.filteredProjects, test.describe.configure({ lock }), 60fps videos with CSS-styled action callouts and VP9 encoding, toHaveScreenshot: { type: 'webp' }, page.getByRef(), APIRequestContext cookie methods, passkey signCount, and page.content({ includeShadow }). Breaking changes flagged where they bite: device screen forwarding, --update-snapshots=missing now passing, elements in hidden iframes counting as hidden, and JSX following tsconfig.json.

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.

Install

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

🎬 Watch the installation guide Watch the installation guide

Skill Packs

PackGuidesWhat's covered
core50Locators, assertions, fixtures, auth, API testing, network mocking, visual regression, accessibility, debugging, trace-report analysis, framework recipes, architecture decisions
qa4For QA engineers: test case design from requirements, bug reports from failing tests, manual-to-automated conversion, test review
frontend2For frontend engineers: adding valid, unique, stable data-testid attributes (naming, list uniqueness, stability) + React/Vue/Angular/Svelte patterns
ci9GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, sharding, reporting, coverage
playwright-cli10CLI browser automation, screenshots, tracing, session management, device emulation
pom2Page Object Model patterns, POM vs fixtures vs helpers
migration2Migrating from Cypress, migrating from Selenium

Golden Rules

The patterns every guide assumes (full list with rationale in SKILL.md):

  1. getByRole() over CSS/XPath — resilient to markup changes
  2. Never page.waitForTimeout() — use web-first assertions or page.waitForURL()
  3. Isolate every test — no shared state, no order dependencies
  4. baseURL in config — zero hardcoded URLs in tests
  5. Mock external services only — never mock your own app

Core Skills

The foundation: writing, debugging, and maintaining reliable tests. New to Playwright? Start with locators.md, assertions-and-waiting.md, and fixtures-and-hooks.md.

Writing Tests

GuideDescription
locators.mdSelector strategies — getByRole, getByText, getByTestId
locator-strategy.mdChoosing a locator strategy and trade-offs
assertions-and-waiting.mdWeb-first assertions, auto-retry, waiting patterns
fixtures-and-hooks.mdtest.extend(), setup/teardown, worker-scoped fixtures
configuration.mdplaywright.config.ts — projects, timeouts, reporters, web server
test-organization.mdFile structure, tagging, test.describe, test filtering
test-data-management.mdFactories, seeding, cleanup strategies
authentication.mdStorage state reuse, multi-role auth, session management
auth-flows.mdLogin, OAuth, and multi-step auth flows
api-testing.mdREST and GraphQL testing with request fixture
network-mocking.mdRoute interception, HAR replay, response modification
when-to-mock.mdWhen to mock vs hit real services
forms-and-validation.mdForm fills, validation, error states, multi-step wizards
crud-testing.mdCreate / read / update / delete flow testing
search-and-filter.mdSearch and filter UI testing
drag-and-drop.mdDrag-and-drop interactions
file-operations.mdFile handling in tests
file-upload-download.mdUpload and download flows
error-and-edge-cases.mdError states and edge-case coverage
visual-regression.mdScreenshot comparison, thresholds, masking dynamic content
accessibility.mdaxe-core integration, ARIA assertions, a11y auditing
component-testing.mdComponent tests with the stories-and-galleries mount() model (1.62+)
mobile-and-responsive.mdDevice emulation, viewport testing, touch interactions

Debugging & Fixing

GuideDescription
debugging.mdTrace viewer, PWDEBUG, UI mode, headed + slow-mo
test-agents.mdPlaywright Test Agents: plan, generate and heal tests with an AI tool; when to use playwright-cli or MCP instead
trace-analysis.mdDebug a trace.zip from the terminal with the npx playwright trace CLI — agent-native, decision trees, failure playbooks
error-index.mdCommon error messages and how to fix them
flaky-tests.mdRoot causes, retry strategies, stabilization patterns
dynamic-test-selection.mdSelect or quarantine tests at runtime with reporter.preprocess() and an external flakiness API
common-pitfalls.mdTop beginner mistakes and how to avoid them

Architecture Decisions

QuestionGuide
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.md

Framework Recipes

GuideDescription
nextjs.mdApp Router + Pages Router testing
react.mdVite and React app testing
vue.mdVue 3 / Nuxt testing
angular.mdAngular testing patterns

Specialized Topics

GuideDescription
browser-apis.mdGeolocation, clipboard, permissions
iframes-and-shadow-dom.mdCross-frame testing, Shadow DOM piercing
multi-context-and-popups.mdMulti-tab, popups, new windows
multi-user-and-collaboration.mdMulti-user and real-time collaboration flows
websockets-and-realtime.mdWebSocket testing, real-time UI
canvas-and-webgl.mdCanvas testing, visual comparison
electron-testing.mdDesktop app testing with Electron
security-testing.mdXSS, CSRF, header validation
performance-testing.mdCore Web Vitals, Lighthouse, benchmarks
clock-and-time-mocking.mdFake timers, date mocking
service-workers-and-pwa.mdPWA testing, offline mode
browser-extensions.mdExtension testing patterns
webmcp-testing.mdTesting agent tools a page exposes via WebMCP (1.64+)
third-party-integrations.mdTesting against third-party services
i18n-and-localization.mdMulti-language, RTL, locale testing

QA Skills

For QA engineers: the work around the test code.

GuideDescription
test-design.mdRequirements to test cases: boundaries, partitions, state transitions, risk ranking, generator-ready plans
bug-reports.mdClassify a failure, write a reproducible bug report, keep the test with test.fail()
manual-to-automated.mdTriage and convert manual cases to Playwright specs with case-ID traceability
test-review.mdReview checklist by severity, prove a test can fail, eslint-plugin-playwright

Frontend Skills

For frontend engineers writing the app — make components reliably locatable by tests and AI agents (the authoring counterpart to the test-author guides above).

GuideDescription
data-testid-conventions.mdWhen to add data-testid, naming convention, uniqueness in lists, stability rules, testIdAttribute config
examples.mdReact/JSX, Vue, Angular, Svelte patterns; centralizing IDs; optional production stripping

CI/CD Skills

GuideDescription
ci-github-actions.mdWorkflows, caching, artifact uploads
ci-gitlab.mdGitLab CI pipelines
ci-other.mdCircleCI, Azure DevOps, Jenkins
parallel-and-sharding.mdSharding across CI runners
docker-and-containers.mdContainerized test execution
reporting-and-artifacts.mdHTML reports, traces, screenshots
test-coverage.mdCode coverage collection
global-setup-teardown.mdOne-time setup/teardown
projects-and-dependencies.mdMulti-project config, dependencies

Playwright CLI Skills

GuideDescription
core-commands.mdOpen, navigate, click, fill, keyboard, mouse
request-mocking.mdRoute interception, conditional mocks, HAR replay
running-custom-code.mdFull Playwright API via run-code
session-management.mdNamed sessions, isolation, persistent profiles
storage-and-auth.mdCookies, localStorage, auth state save/restore
test-generation.mdAuto-generate test code from CLI interactions
tracing-and-debugging.mdTraces, console/network monitoring
screenshots-and-media.mdScreenshots, video recording, PDF export
device-emulation.mdViewport, geolocation, locale, dark mode
advanced-workflows.mdPopups, scraping, accessibility auditing

Migration Skills

GuideDescription
from-cypress.mdCypress to Playwright migration
from-selenium.mdSelenium/WebDriver to Playwright migration

Page Object Model Skills

GuideDescription
page-object-model.mdPOM patterns for Playwright
pom-vs-fixtures-vs-helpers.mdWhen to use POM vs fixtures vs helpers

License

MIT

Want something like this for your team?

We build custom MCPs and Claude skills tailored to private workflows. Get in touch.

Start a Conversation

Ready to Ship Something?

Tell us about your project. We respond within one business day with honest scoping — not a sales pitch.

Get Started