Playwright Core
Use this skill for day-to-day Playwright implementation work. It is the foundation of the pack and should be the default path when the user wants tests written, fixed, or reviewed.
Core Standards
- Prefer
getByRole()and other user-facing locators over brittle selectors. - Prefer web-first assertions over manual sleeps or ad hoc polling.
- Keep tests isolated and independent of execution order.
- Use
baseURL, fixtures, and reusable setup instead of hardcoded environment drift. - Mock external dependencies selectively; do not mask the system under test without a reason.
- Choose the lightest test type that still validates the real risk.
Read by Need
| Need | Guide |
|---|---|
| Locators and selector strategy | locators.md, locator-strategy.md, locator-resilience.md |
| Assertions, waiting, and async behavior | assertions-and-waiting.md, debugging.md, flaky-tests.md |
| Test structure and data | test-organization.md, test-architecture.md, fixtures-and-hooks.md, test-data-management.md |
| Authentication and browser state | authentication.md, auth-flows.md |
| API and network behavior | api-testing.md, network-mocking.md, when-to-mock.md, api-handler-hardening.md |
| UI capability areas | forms-and-validation.md, crud-testing.md, file-upload-download.md, drag-and-drop.md, search-and-filter.md |
| Reliability and diagnostics | common-pitfalls.md, error-index.md, error-and-edge-cases.md, stability-diagnostics.md, preflight.md |
| Specialized environments | mobile-and-responsive.md, component-testing.md, browser-apis.md, service-workers-and-pwa.md, electron-testing.md |
| Framework recipes | react.md, nextjs.md, vue.md, angular.md |
Scope
- Use this skill for implementation guidance and debugging patterns.
- Move to ../pom/SKILL.md when the main problem is test architecture ownership.
- Move to ../ci/SKILL.md when the main problem is pipeline execution.