What problem does it solve?
This skill provides a structured, battle-tested set of patterns to write reliable, fast, and maintainable Playwright tests in TypeScript. It helps teams avoid flaky tests, messy test code, and brittle selectors by providing clear guidance on test structure, selectors, waits, assertions, page objects, fixtures, and error handling.
Core Features & Use Cases
- Test Structure: Organize tests with clear describes and describe blocks, reuse page objects, and minimize duplication.
- Selectors & Accessibility: Favor role-based selectors and labels over brittle CSS selectors for robustness and accessibility.
- Waits & Timing: Leverage Playwright's auto-waiting and explicit waits to optimize reliability and speed.
- Page Objects & Fixtures: Promote reusable page objects and fixtures for isolated, maintainable tests.
- Test Organization & Anti-Patterns: Provide guidance to prevent hard-coded waits, flaky tests, and interdependent tests.
Quick Start
Review the core principles and integrate the skill into your Playwright project by adopting the recommended structure and patterns for your tests.