playwright

Guide end-to-end testing with Playwright, covering configuration, locators, assertions, and CI/CD.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill playwright-repairyourtech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/stack/testing/playwright
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill playwright-repairyourtech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to end-to-end testing with Playwright, enabling developers to build reliable, production-ready web applications by catching bugs early and ensuring consistent user experiences.

Core Features & Use Cases

  • Configuration: Set up Playwright projects with detailed playwright.config.ts.
  • Test Patterns: Implement basic tests, Page Object Model, and custom fixtures.
  • Locator Strategies: Utilize semantic locators for resilient test scripts.
  • Assertions: Apply various assertions to validate UI states and data.
  • Network Mocking: Mock API responses for isolated and predictable testing.
  • Authentication: Set up and manage authenticated test states.
  • Visual Regression: Integrate visual testing for UI consistency.
  • Debugging: Leverage Trace Viewer and UI Mode for efficient debugging.
  • CI/CD: Integrate Playwright tests into GitHub Actions workflows.

Quick Start

Use the playwright skill to set up a new Playwright project and write your first end-to-end test.

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I set up Playwright for end-to-end web testing?

You set up Playwright for end-to-end web testing by configuring a detailed `playwright.config.ts` file and implementing basic test patterns. This foundation enables robust automated testing to catch bugs early and ensure application quality.

What is the best way to mock API responses in E2E testing?

The best way to mock API responses in E2E testing is using network mocking features. This approach allows you to isolate tests and create predictable testing environments by intercepting and modifying network requests.

How do I manage authentication states in Playwright tests?

You manage authentication states in Playwright tests by setting up and saving authenticated test states. This allows subsequent tests to bypass login flows, ensuring reliable and efficient execution of your end-to-end test suite.

Can I integrate Playwright tests into a GitHub Actions CI/CD workflow?

Yes, you can integrate Playwright tests into a GitHub Actions CI/CD workflow. This integration automates your end-to-end testing pipeline, catching bugs early and ensuring consistent user experiences during deployment.

How do I debug failing E2E tests using Playwright?

You debug failing E2E tests using Playwright by leveraging the Trace Viewer and UI Mode. These tools provide detailed execution insights, enabling efficient identification and resolution of issues within your test scripts.

Why use semantic locators for web testing automation?

Semantic locators are used for web testing automation to build resilient test scripts. By targeting elements based on accessible attributes rather than brittle CSS selectors, tests remain stable against UI changes and ensure consistent execution.