playwright-skill

Provides Playwright testing guidance for E2E, API, visual, accessibility, and CI/CD workflows.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/bilacchi/agents-skills --skill playwright-skill-bilacchi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-skill
Source: https://github.com/bilacchi/agents-skills/tree/main/skills/playwright-skill
Command: npx skills add https://github.com/bilacchi/agents-skills --skill playwright-skill-bilacchi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing and maintaining Playwright test suites involves many decisions — locator strategies, waiting patterns, mocking boundaries, CI configuration — and getting them wrong leads to flaky, slow, or brittle tests. This Skill gives an AI coding agent 69 production-tested guides so it can write, debug, and scale Playwright tests using proven patterns instead of guesswork. ## Core Features & Use Cases - Test Writing Guidance: Covers locators, web-first assertions, fixtures, authentication, network mocking, visual regression, accessibility, and component testing with TypeScript and JavaScript examples. - CI/CD and CLI Automation: Includes pipeline configs for GitHub Actions, GitLab, Docker, and sharding, plus terminal-driven browser automation via playwright-cli for navigation, screenshots, tracing, and test generation. - Migration and Architecture Decisions: Provides Cypress and Selenium migration paths plus decision guides like POM vs fixtures vs helpers and mock vs real services. - Use Case: Ask the agent to fix a flaky login test, and it pulls the flaky-tests and authentication guides to apply web-first assertions, storage state reuse, and proper retry configuration. ## Quick Start Ask the agent to write a Playwright test for your login flow using getByRole locators and web-first assertions.

Frequently Asked Questions about playwright-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write reliable Playwright tests without flaky waits?▼

Use web-first assertions like expect(locator).toBeVisible() instead of page.waitForTimeout(), since they auto-retry until the condition passes. Prefer getByRole locators over CSS or XPath selectors to stay resilient to markup changes.

How to migrate from Cypress to Playwright?▼

The migration guide provides side-by-side command mappings, architecture translations, and an incremental adoption strategy. It covers converting cy.visit, cy.get, and intercept patterns into Playwright equivalents like page.goto, getByRole, and route interception.

Should I use Page Object Model or fixtures in Playwright?▼

The pom-vs-fixtures-vs-helpers guide explains when each pattern fits. Fixtures via test.extend() handle shared state and setup, while page objects suit large suites with repeated complex interactions across many pages.

Does Playwright support accessibility testing with axe-core?▼

Yes, the accessibility guide integrates @axe-core/playwright for automated WCAG violation scans, scoped region checks, and rule filtering. It also covers ARIA snapshot assertions, keyboard navigation tests, and live region verification.

How do I run Playwright tests in GitHub Actions CI?▼

The CI guides cover GitHub Actions workflows with browser binary caching, sharding across runners, and uploading traces and HTML reports as artifacts. They recommend retries set to 2 in CI and traces on first retry.

When should I mock network requests in Playwright tests?▼

Mock only external third-party services like payment gateways or email APIs, never your own application. The when-to-mock guide explains the trade-offs, and network-mocking covers route interception, HAR replay, and response modification.