playwright-best-practices

Guide Playwright test writing, debugging, and maintenance with best practices.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Blake-John/agent-config --skill playwright-best-practices-blake-john
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-best-practices
Source: https://github.com/Blake-John/agent-config/tree/main/.zeroclaw/workspace/skills/playwright-best-practices
Command: npx skills add https://github.com/Blake-John/agent-config --skill playwright-best-practices-blake-john

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Playwright Best Practices provides comprehensive guidance for writing, debugging, and maintaining Playwright tests in TypeScript, helping teams reduce flakiness and accelerate delivery.

Core Features & Use Cases

  • Activity-based references for writing E2E, component, API, visual, accessibility, security, and integration tests.
  • Organized guidance across core topics (locators, assertions, POM, fixtures, test data, annotations) plus specialized areas (mobile testing, iFrames, graphs, clocks, websockets, i18n, Electron, browser extensions).
  • A clear, task-focused workflow that maps your current activity to relevant references and loads contextually aware guidance in your repo.

Quick Start

Describe your testing task and I will apply Playwright best practices to guide you.

Frequently Asked Questions about playwright-best-practices

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

FAQPage Schema
How do I reduce flakiness in Playwright tests?

Yes, Playwright supports component testing alongside E2E and API testing. This Skill surfaces context-specific guidance to help you write, debug, and maintain component tests using TypeScript best practices.

Does Playwright work for mobile, Electron, and browser extension testing?

Playwright works for mobile, Electron, and browser extension testing. This Skill loads specialized references covering these contexts, plus iFrames, websockets, and i18n, to guide your test implementation.

What is the best way to structure Playwright test data and fixtures?

The best way to structure Playwright test data and fixtures is using the Page Object Model and built-in fixture patterns. This Skill maps your current activity to references that govern test data, annotations, and fixture organization.

How do I set up Playwright tests in CI/CD pipelines?

To set up Playwright tests in CI/CD pipelines, apply regression considerations and visual, accessibility, and performance testing workflows. This Skill provides task-focused guidance to integrate and maintain these tests effectively.

Why are my Playwright tests timing out or failing to find locators?

Playwright tests time out or fail to find locators when best practices for auto-waiting and resilient selectors are not followed. This Skill guides you to use proper locators, assertions, and debugging techniques to resolve these issues.