skillfed

playwright-skill

This skill teaches you how to build robust end-to-end tests using Playwright's powerful browser automation capabilities. You'll explore testing patterns, debugging techniques, and strategies for creating maintainable test suites that catch real-world issues. Perfect for developers looking to strengthen their QA automation toolkit.

playwright-skill teaches you to write reliable end-to-end tests by following proven testing patterns and maintainability strategies. Key best practices include using page object models to organize your test code, leveraging Playwright's built-in locators for stable element selection, implementing proper waits and timeouts, and structuring tests with clear arrange-act-assert patterns. The skill emphasizes creating maintainable test suites that catch real-world issues while minimizing flakiness through proper synchronization and error handling.

AI-generated summary based on this skill's SKILL.md

4,440 447 MIT updated by zebbern

Install

zebbern/claude-code-guide/playwright · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/zebbern/claude-code-guide
cp -r claude-code-guide/skills/playwright ~/.claude/skills/playwright

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are the best practices for writing Playwright tests?

playwright-skill teaches you to write reliable end-to-end tests by following proven testing patterns and maintainability strategies. Key best practices include using page object models to organize your test code, leveraging Playwright's built-in locators for stable element selection, implementing proper waits and timeouts, and structuring tests with clear arrange-act-assert patterns. The skill emphasizes creating maintainable test suites that catch real-world issues while minimizing flakiness through proper synchronization and error handling.

How do you set up Playwright in CI/CD pipelines and configure for different environments?

playwright-skill covers the complete setup process for integrating Playwright into your CI/CD workflows, including GitHub Actions configuration. You'll learn how to configure Playwright for different environments (development, staging, production), manage environment-specific variables, run tests in parallel across multiple browsers, and optimize test execution for CI runners. The skill provides practical guidance on containerization, artifact management, and strategies for reliable test execution in automated pipelines.

What does playwright-skill teach about migrating from Selenium to Playwright with guidance and examples?

playwright-skill provides direct comparison and migration strategies for developers transitioning from Selenium. You'll understand the key architectural differences between Selenium and Playwright, learn how to translate Selenium locators and commands to Playwright equivalents, and discover Playwright's advantages like better synchronization, faster execution, and improved debugging capabilities. The skill includes practical examples showing side-by-side code comparisons to accelerate your migration journey.

How can you debug flaky tests and troubleshoot common Playwright errors?

playwright-skill equips you with comprehensive debugging techniques to identify and fix unreliable tests. You'll learn to use Playwright's built-in debugging tools, trace viewer, and inspector to diagnose test failures, implement proper wait strategies to eliminate race conditions, and recognize common error patterns. The skill covers root causes of flakiness such as timing issues, element visibility problems, and network synchronization, providing actionable solutions to make your test suites more robust.

What specialized testing scenarios does playwright-skill cover?

playwright-skill teaches you to handle advanced testing scenarios including accessibility testing to ensure compliance with WCAG standards, visual regression testing to catch unintended UI changes, API mocking to simulate backend responses, and authentication flows for secure testing. These specialized techniques allow you to build comprehensive test coverage that goes beyond basic user interactions, ensuring your applications meet accessibility requirements and behave correctly under various conditions.

How do Playwright locators and selectors work for reliable element selection?

playwright-skill explains Playwright's powerful locator system, which provides more resilient element selection than traditional CSS or XPath selectors alone. You'll learn to use Playwright's recommended locators like role-based selectors, test IDs, and text matching, which are less brittle when UI changes occur. The skill demonstrates how to combine multiple locator strategies, implement custom locators when needed, and follow best practices that make your tests maintainable and resistant to false failures caused by minor DOM changes.

SKILL.md

rendered from the published skill — quoted content, verbatim

Playwright Skill

> Opinionated, production-tested Playwright guidance — every pattern includes when (and when not) to use it.

50+ reference guides covering the full Playwright surface: selectors, assertions, fixtures, page objects, network mocking, auth, visual regression, accessibility, API testing, CI/CD, debugging, and more — with TypeScript and JavaScript examples throughout.

Golden Rules

  1. getByRole() over CSS/XPath — resilient to markup changes, mirrors how users see the page
  2. Never page.waitForTimeout() — use expect(locator).toBeVisible() or page.waitForURL()
  3. Web-first assertionsexpect(locator) auto-retries; expect(await locator.textContent()) does not
  4. Isolate every test — no shared state, no execution-order dependencies 5.

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
skills/playwright/LICENSE
skills/playwright/SKILL.md
skills/playwright/ci/SKILL.md
skills/playwright/ci/ci-github-actions.md
skills/playwright/ci/ci-gitlab.md
skills/playwright/ci/ci-other.md
skills/playwright/ci/docker-and-containers.md
skills/playwright/ci/global-setup-teardown.md
skills/playwright/ci/parallel-and-sharding.md
skills/playwright/ci/projects-and-dependencies.md
skills/playwright/ci/reporting-and-artifacts.md
skills/playwright/ci/test-coverage.md
skills/playwright/core/SKILL.md
skills/playwright/core/accessibility.md
skills/playwright/core/angular.md

Related skills

Tags

end-to-end-testing test-automation web-testing-framework ui-validation qa-engineering cross-browser-testing test-patterns ci-cd-integration test-debugging quality-assurance