test-playwright

Provide Playwright test patterns for stable end-to-end browser tests.

1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/froide-kk/michinushi --skill test-playwright-froide-kk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-playwright
Source: https://github.com/froide-kk/michinushi/tree/main/test-playwright
Command: npx skills add https://github.com/froide-kk/michinushi --skill test-playwright-froide-kk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates Playwright-specific patterns, selector strategies, waiting and assertion best practices to reduce flaky end-to-end browser tests and improve reproducibility across CI and local runs.

Core Features & Use Cases

  • Selector strategy: Prioritizes accessible selectors such as role and label, and treats test IDs and CSS as fallbacks to minimize brittle selectors.
  • Waiting & synchronization: Recommends explicit wait patterns and response or URL waits to avoid timing issues.
  • Assertions & visual regression: Shows robust assertion patterns and guidelines for screenshot baselining and masked comparisons for UI regressions.
  • Execution & diagnostics: Describes common commands, trace and artifact collection, and recommended test file layout for e2e suites.

Quick Start

Generate a Playwright test that covers the login and checkout flow using robust selectors, explicit waits, and a visual regression screenshot.

Frequently Asked Questions about test-playwright

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

FAQPage Schema
How do I write stable Playwright E2E tests that don't flake in CI?

Stable Playwright E2E tests rely on accessible selectors, explicit wait patterns, and robust assertions to prevent timing issues. This Skill provides conventions for role-based selectors, response waits, and screenshot baselining to reduce flakiness across CI and local runs.

What is the best selector strategy for Playwright to avoid brittle E2E tests?

The best selector strategy for Playwright prioritizes accessible selectors like role and label, using test IDs and CSS only as fallbacks. This approach minimizes brittle selectors and ensures your end-to-end tests remain stable during UI changes.

How do I manage visual regression screenshots in Playwright?

Visual regression in Playwright is managed through screenshot baselining and masked comparisons for UI regressions. This Skill outlines guidelines for capturing, comparing, and maintaining screenshot baselines to ensure reliable visual checks.

Why does my Playwright test fail due to timing and synchronization issues?

Playwright tests fail from timing issues when implicit waits are used instead of explicit synchronization. Applying explicit wait patterns, such as waiting for specific network responses or URL changes, resolves these timing and synchronization failures.

Can I use Playwright for user login and form submission workflows?

Yes, Playwright is designed for web application E2E workflows including user login, navigation, and form submission. This Skill provides specific patterns and test file layouts to standardize these end-to-end browser workflows.