playwright

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

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-t-jet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/t-jet/pal_found_cli/tree/main/.ept/skills/playwright
Command: npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-t-jet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, @axe-core/playwright, and includes references (resource) components.

What problem does it solve? Writing and maintaining Playwright tests involves many decisions — locator strategy, fixtures, mocking, auth, CI configuration — and poor choices lead to flaky, slow suites. This Skill supplies opinionated, production-tested guidance across the full Playwright surface so tests are written correctly the first time. ## Core Features & Use Cases - 50+ Reference Guides: Covers locators, assertions, fixtures, page objects, network mocking, authentication, visual regression, accessibility, API testing, and debugging, with TypeScript and JavaScript examples. - CI/CD & Framework Recipes: Includes GitHub Actions, GitLab, CircleCI, Azure, Jenkins, Docker, sharding, plus recipes for React, Next.js, Vue, and Angular, and migration guides from Cypress and Selenium. - CLI Browser Automation: A playwright-cli sub-skill for driving browsers from the command line — snapshots, clicks, form fills, network mocking, session management, and test generation. - Use Case: When asked to write an E2E test for a login flow, the Skill directs you to role-based locators, web-first assertions, storage-state auth reuse, and trace-on-first-retry configuration. ## Quick Start Ask the agent to write a Playwright E2E test for your app's login flow using role-based locators and web-first assertions.

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I write reliable Playwright tests that don't flake?

Use role-based locators like getByRole() instead of CSS or XPath, rely on web-first assertions such as expect(locator).toBeVisible() that auto-retry, and never use page.waitForTimeout(). Isolate every test and set retries to 2 in CI and 0 locally.

What locator strategy should I use in Playwright?

Prefer getByRole() first since it mirrors how users perceive the page and resists markup changes. Fall back to getByLabel() for form fields, getByText() for content, and data-testid attributes only when no semantic locator works.

How do I migrate tests from Cypress or Selenium to Playwright?

The skill includes dedicated migration guides for Cypress and Selenium covering API mapping, async/await conversion, locator translation, and fixture replacement. Follow the from-cypress.md or from-selenium.md guides for step-by-step patterns.

Does Playwright support accessibility testing with axe-core?

Yes, integrate @axe-core/playwright to run automated WCAG scans in any test. Use AxeBuilder with tags like wcag2aa for compliance levels, scope scans to components, and supplement with keyboard navigation and focus-trap tests.

When should I mock network requests in Playwright tests?

Mock only external third-party services such as payment gateways, email providers, or external APIs using page.route(). Never mock your own application's backend, since that undermines the purpose of end-to-end testing.

How do I run Playwright tests in GitHub Actions CI?

Use the ci-github-actions.md guide which covers browser installation, sharding for parallel execution, trace and report artifacts, and pinning actions to commit SHAs. Set retries to 2 and traces to on-first-retry in CI configuration.