Skip to main content
The TestDino Playwright skill is a knowledge pack that coding agents (Claude Code, Cursor, VS Code Copilot, Gemini CLI) load on demand to generate Playwright tests that follow best practices. The same guides cover debugging and maintaining the tests the agent writes. Install it with the command below, then ask your agent to write a test. The source is public at github.com/testdino-hq/playwright-skill, MIT licensed. The current release is v2.5.0, covering Playwright 1.63.

testdino-hq/playwright-skill on GitHub

71 guides across 5 packs. Browse the source, open an issue, or star the repository.
The skill follows the open Agent Skills specification.

Installation

Install individual packs when you need specific coverage:
No additional configuration is required. Your agent picks it up on its own as soon as it sees Playwright in the repo.

Supported Tools

Skill Packs

How It Works

The TestDino skill ships as a folder your agent loads. SKILL.md tells it when to reach for TestDino. The manifest declares metadata, core instructions, and an index of guides. Reference documents contain topic-specific guidance the agent reads on demand.

Progressive Disclosure

Skills load in 3 stages, so most of the pack stays out of the context window until a task needs it. Sizes below come from the files in the repository; token counts assume roughly 4 characters per token. The agent decides which stage to enter from the task. “Fix this flaky Playwright test” loads the core index, then flaky-tests.md and dynamic-test-selection.md, and leaves the other 46 core guides untouched. Loading the full guide set into a system prompt would cost several hundred thousand tokens per session. RAG retrieval avoids that cost but returns fragments without the opinionated guidance the indexes carry.

Golden Rules

The root SKILL.md defines 10 rules that every guide assumes:
  1. getByRole() over CSS and XPath
  2. Never page.waitForTimeout(). Use web-first assertions or page.waitForURL()
  3. Web-first assertions: expect(locator) auto-retries, expect(await locator.textContent()) does not
  4. Isolate every test. No shared state, no execution-order dependencies
  5. baseURL in config, zero hardcoded URLs in tests
  6. Retries: 2 in CI, 0 locally
  7. Traces: 'on-first-retry'
  8. Fixtures over globals: share state via test.extend()
  9. One behavior per test
  10. Mock external services only. Never mock your own app

Security Trust Boundary

The skill is written for testing applications you own or are authorized to test. Its guides treat page content, API payloads, and screenshots returned from staging or production as untrusted input, and tell the agent not to feed raw page text back into instructions or dynamic code execution. CI guides pin GitHub Actions and Docker images to commit SHAs and image digests rather than mutable tags.

Coverage

Core

Locators and locator strategy, assertions and waiting, fixtures and hooks, configuration, test organization and architecture, test data management, authentication and auth flows, API testing (REST and GraphQL), network mocking and when to mock, forms and validation, CRUD flows, search and filter UIs, drag and drop, file operations, uploads and downloads, error and edge cases, component testing, mobile and responsive.

Debugging

Trace viewer and UI mode, error index, flaky test diagnosis, common pitfalls, and trace-analysis.md: debugging a trace.zip from the terminal with npx playwright trace, written for agents.

Dynamic Test Selection

Added in v2.5.0 for Playwright 1.62. reporter.preprocess() selects tests before execution, with skip, exclude, fixed, and failing marks. The guide covers driving quarantine from an external flakiness API, matching on full title paths, and retryStrategy: 'isolated'. It recommends failing over skip for quarantine, so a recovered test removes itself from the list.

Framework Recipes

React (CRA, Vite), Next.js (App Router and Pages Router), Vue 3 and Nuxt, Angular.

Visual and Accessibility

Visual regression with toHaveScreenshot(), WebP snapshots with a quality parameter, axe-core integration, ARIA assertions, keyboard navigation.

Specialized Topics

Multi-user and real-time collaboration, WebSockets, browser APIs (geolocation, clipboard, permissions), iframes and Shadow DOM, multi-tab and popups, canvas and WebGL, service workers and PWAs, Electron, browser extensions, security testing, performance and Core Web Vitals, clock and time mocking, third-party integrations, i18n and localization.

CI/CD

Page Object Model

POM implementation patterns with a decision guide for choosing between page objects, fixtures, and helper functions.

Migration

API mapping tables and incremental migration strategies:
  • Cypress to Playwright: cy.get() to page.locator(), cy.intercept() to page.route()
  • Selenium/WebDriver to Playwright: driver setup, element interaction, and wait strategy translation

Playwright CLI

Core commands, request mocking, running custom code through run-code, session management, storage and auth state, test generation, tracing and debugging, screenshots and media, device emulation, advanced workflows.

Playwright Version Coverage

The guides track Playwright releases. v2.5.0 covers 1.63 and earlier.
Playwright 1.62 deprecated the experimental component testing packages (@playwright/experimental-ct-react, -ct-react17, -ct-vue) in favour of the stories and galleries model. core/component-testing.md carries a banner noting its mount() patterns predate that change. The testing concepts hold; check the current Playwright docs before copying a mounting snippet.

Example Prompts

Each prompt below loads a different slice of the skill. The right column is what the agent reads before it answers:

GitHub Repository

Full source and all guides. MIT licensed.

Agent Skills Specification

The open standard defining how skills, manifests, and progressive disclosure work.

TestDino MCP

Connect AI assistants to your test data.

Test Generation

Record or describe a flow and compile it to a Playwright spec.
Last modified on September 9, 2026