playwright-skill

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing and maintaining Playwright test suites involves many decisions — locator strategy, waiting patterns, mocking boundaries, CI configuration, and debugging flaky tests — and getting them wrong leads to brittle, slow suites. This Skill gives an AI coding agent an indexed library of 70 production-tested Playwright guides so it can apply the right pattern for the task at hand. ## Core Features & Use Cases - Comprehensive guide index: 70 Markdown guides covering locators, assertions, fixtures, auth, network mocking, visual regression, accessibility, component testing, and framework recipes for Next.js, React, Vue, and Angular, in TypeScript and JavaScript. - CI/CD and infrastructure packs: Guides for GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, sharding, reporting, and coverage. - CLI automation, POM, and migration packs: Terminal-first browser automation with playwright-cli, Page Object Model patterns, and migration paths from Cypress and Selenium. - Use Case: Ask the agent to stabilize a flaky checkout test; it loads the flaky-tests and assertions guides, replaces waitForTimeout calls with web-first assertions, and configures retries and traces for CI. ## 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?▼

Replace page.waitForTimeout() with web-first assertions like expect(locator).toBeVisible(), which auto-retry until the condition holds. The guides also recommend getByRole locators, test isolation, and baseURL in config to eliminate common flakiness sources.

How do I debug a failing Playwright test from CI?▼

Configure traces: 'on-first-retry' so CI captures a trace.zip on failure, then analyze it with the npx playwright trace CLI or trace viewer. The trace-analysis guide provides decision trees and failure playbooks for terminal-based debugging.

Does Playwright support accessibility testing with axe-core?▼

Yes, the @axe-core/playwright integration runs automated WCAG scans via AxeBuilder, with options to scope regions, filter by WCAG level tags, and disable known-issue rules. Playwright 1.59+ also adds page.ariaSnapshot() for accessibility tree assertions.

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

The pom-vs-fixtures-vs-helpers guide explains the trade-offs: fixtures via test.extend() handle shared state and setup, while page objects suit complex pages with many interactions. Simpler tests often need neither.

How do I migrate tests from Cypress to Playwright?▼

The from-cypress migration guide provides side-by-side command mappings, architecture translations, and an incremental adoption strategy so you can move suites gradually without a full rewrite.

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 covers the decision framework, and network-mocking.md covers route interception and HAR replay.