Skip to content
Skill

playwright-best-practices

by currents-dev

AI Summary

This skill provides comprehensive guidance for all aspects of Playwright test development, from writing new tests to debugging and maintaining existing test suites. Consult these references based on what you're doing:

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "playwright-best-practices" skill in my project.

Please run this command in my terminal:
# Install skill into your project
mkdir -p .claude/skills/playwright-best-practices-skill && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/playwright-best-practices-skill/SKILL.md "https://raw.githubusercontent.com/currents-dev/playwright-best-practices-skill/main/SKILL.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions, multi-tab/popup flows, mobile/responsive layouts, touch gestures, GraphQL, error handling, offline mode, multi-user collaboration, third-party services (payments, email verification), console error monitoring, global setup/teardown, test annotations (skip, fixme, slow), test tags (@smoke, @fast, @critical, filtering with --grep), project dependencies, security testing (XSS, CSRF, auth), performance budgets (Web Vitals, Lighthouse), iframes, component testing, canvas/WebGL, service workers/PWA, test coverage, i18n/localization, Electron apps, or browser extension testing. Covers E2E, component, API, visual, accessibility, security, Electron, and extension testing.

Playwright Best Practices

This skill provides comprehensive guidance for all aspects of Playwright test development, from writing new tests to debugging and maintaining existing test suites.

Activity-Based Reference Guide

Consult these references based on what you're doing:

Writing New Tests

When to use: Creating new test files, writing test cases, implementing test scenarios | Activity | Reference Files | | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | Writing E2E tests | test-suite-structure.md, locators.md, assertions-waiting.md | | Writing component tests | component-testing.md, test-suite-structure.md | | Writing API tests | api-testing.md, test-suite-structure.md | | Writing GraphQL tests | graphql-testing.md, api-testing.md | | Writing visual regression tests | visual-regression.md, canvas-webgl.md | | Structuring test code with POM | page-object-model.md, test-suite-structure.md | | Setting up test data/fixtures | fixtures-hooks.md, test-data.md | | Handling authentication | authentication.md, authentication-flows.md | | Testing date/time features | clock-mocking.md | | Testing file upload/download | file-operations.md, file-upload-download.md | | Testing forms/validation | forms-validation.md | | Testing drag and drop | drag-drop.md | | Testing accessibility | accessibility.md | | Testing security (XSS, CSRF) | security-testing.md | | Using test annotations | annotations.md | | Using test tags | test-tags.md | | Testing iframes | iframes.md | | Testing canvas/WebGL | canvas-webgl.md | | Internationalization (i18n) | i18n.md | | Testing Electron apps | electron.md | | Testing browser extensions | browser-extensions.md |

Mobile & Responsive Testing

When to use: Testing mobile devices, touch interactions, responsive layouts | Activity | Reference Files | | ------------------------------- | -------------------------------------------------------------------------------- | | Device emulation | mobile-testing.md | | Touch gestures (swipe, tap) | mobile-testing.md | | Viewport/breakpoint testing | mobile-testing.md | | Mobile-specific UI | mobile-testing.md, locators.md |

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
Adoption100+ stars on GitHub
190 ★ · Growing
DocsREADME + description
Well-documented

GitHub Signals

Stars190
Forks40
Issues0
Updated1mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code