Skip to main content
skillsFirst-partyReview first Safety Privacy

Playwright E2E Testing Automation Skill

Write and maintain reliable end-to-end tests with Playwright — Microsoft's browser automation library that auto-waits for actionable elements and runs the same suite against Chromium, Firefox, and WebKit.

HarnessClaude CodeCodexWindsurfGeminiCursorCLI
Level:advancedType:generalVerified:draft
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://playwright.dev/docs/intro, https://github.com/JSONbored/awesome-claude/blob/main/content/skills/playwright-e2e-testing.mdx
Package URL
/downloads/skills/playwright-e2e-testing.zip
Package SHA256
61fb431b4e7253846d6c180b34c22226e431cd3234bd5f6917fdf18702df5dbe
Safety notes
`npx playwright install --with-deps` downloads browser binaries (~500 MB for Chromium, Firefox, and WebKit) from Playwright's CDN and on Linux installs system-level packages. Review your network and environment policies before running in restricted infrastructure., Generated tests have full browser-level access to any URL they target. Review test scripts before running them against authenticated sessions or production environments — Playwright can submit forms, click buttons, and make network requests as a real user.
Privacy notes
Playwright runs entirely on your local machine. Traces, screenshots, and HTML test reports are written to local disk only and are not uploaded to Microsoft or any external service., Trace files and failure screenshots may capture sensitive content from the application under test (form data, rendered PII, session tokens visible in URLs). Store and rotate these files appropriately.
Platform compatibility
claude-code (native-skill), codex (native-skill), windsurf (native-skill), gemini (native-skill), cursor (adapter), cli (manual-context)
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-16

Decision playbook

Ready to evaluate for your workflow

Signals are comparatively strong, but you should still validate source, privacy posture, and package provenance for your environment.

Compare context
Selected

0

Current score

96

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as first-party.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Complete

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    Package marked verified.

    Done
  • Checksum metadata

    SHA-256 hash is present.

    Done

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Package install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

4 to clear

Platforms

6 listed

Difficulty

100/100

Adoption plan

Balanced adoption plan

Current risk score 0/100. Use staged verification before broader rollout.

Risk 0

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    Package verification/checksum metadata is available.

    Done

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (6/6 signals complete).

Risk 0

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Present

Package integrity metadata is present.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

6/6 steps complete with no blocking gaps for this preset.

Risk 0

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is available.

Done

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

4 prerequisites to line up before setup.

0/4 ready
Install & runtime2General2

Safety & privacy surface

Safety & privacy surface

2 safety and 2 privacy notes across 2 risk areas. Review closely: credentials & tokens, network access.

2 areas
  • SafetyNetwork access`npx playwright install --with-deps` downloads browser binaries (~500 MB for Chromium, Firefox, and WebKit) from Playwright's CDN and on Linux installs system-level packages. Review your network and environment policies before running in restricted infrastructure.
  • SafetyCredentials & tokensGenerated tests have full browser-level access to any URL they target. Review test scripts before running them against authenticated sessions or production environments — Playwright can submit forms, click buttons, and make network requests as a real user.
  • PrivacyNetwork accessPlaywright runs entirely on your local machine. Traces, screenshots, and HTML test reports are written to local disk only and are not uploaded to Microsoft or any external service.
  • PrivacyCredentials & tokensTrace files and failure screenshots may capture sensitive content from the application under test (form data, rendered PII, session tokens visible in URLs). Store and rotate these files appropriately.

Safety notes

  • `npx playwright install --with-deps` downloads browser binaries (~500 MB for Chromium, Firefox, and WebKit) from Playwright's CDN and on Linux installs system-level packages. Review your network and environment policies before running in restricted infrastructure.
  • Generated tests have full browser-level access to any URL they target. Review test scripts before running them against authenticated sessions or production environments — Playwright can submit forms, click buttons, and make network requests as a real user.

Privacy notes

  • Playwright runs entirely on your local machine. Traces, screenshots, and HTML test reports are written to local disk only and are not uploaded to Microsoft or any external service.
  • Trace files and failure screenshots may capture sensitive content from the application under test (form data, rendered PII, session tokens visible in URLs). Store and rotate these files appropriately.

Prerequisites

  • Node.js 18+
  • Playwright 1.40+ with the @playwright/test package
  • Browser binaries installed via `npx playwright install` (Chromium, Firefox, WebKit)
  • A web application accessible for testing (local dev server, staging, or production URL)

Schema details

Install type
package
Reading time
6 min
Difficulty score
100
Troubleshooting
Yes
Breaking changes
No
Package metadata
Package verified
Yes
SHA-256
61fb431b4e7253846d6c180b34c22226e431cd3234bd5f6917fdf18702df5dbe
Skill and platform metadata
Skill type
general
Skill level
advanced
Verification
draft
Verified at
2025-10-16
Retrieval sources
https://playwright.dev/
Tested platforms
ClaudeCodexCursorWindsurfGemini
PlatformSupportInstall path
claude-codeNative.claude/skills/<skill-name>/SKILL.md
codexNative.agents/skills/<skill-name>/SKILL.md
windsurfNative.windsurf/skills/<skill-name>/SKILL.md
geminiNative.gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md
cursorAdapter.cursor/rules/<skill-name>.mdc
cliManualAGENTS.md or tool-specific context file
Full copyable content
import { test, expect } from '@playwright/test';

test.describe('Dashboard Tests', () => {
  test.beforeEach(async ({ page }) => {
    // Login before each test
    await page.goto('https://localhost:3000/login');
    await page.getByLabel('Email').fill('user@example.com');
    await page.getByLabel('Password').fill('password123');
    await page.getByRole('button', { name: 'Sign In' }).click();
    await page.waitForURL('**/dashboard');
  });

  test('displays welcome message', async ({ page }) => {
    const heading = page.getByRole('heading', { name: /welcome/i });
    await expect(heading).toBeVisible();
  });

  test('loads user profile data', async ({ page }) => {
    await page.getByRole('link', { name: 'Profile' }).click();
    await expect(page.getByText('user@example.com')).toBeVisible();
  });
});

About this resource

Playwright is Microsoft's open-source end-to-end testing framework for modern web applications. Its introductory documentation covers the core design principles: auto-waiting for elements to be in an actionable state before interacting with them, full isolation between test contexts, and a unified API that runs the same tests against Chromium, Firefox, and WebKit. This skill brings those capabilities into Claude — you describe a user flow or a bug scenario in plain language, and Claude generates the corresponding @playwright/test spec, configures fixtures, sets up parallel workers, and interprets trace output when tests fail.

What This Skill Enables

Claude can write, execute, and maintain end-to-end tests using Playwright. This covers cross-browser coverage (Chrome, Firefox, Safari/WebKit) from a single test suite, accessibility-first selectors (getByRole, getByLabel, getByText) that survive UI refactors, network request interception for mocking slow or flaky dependencies, and trace recording that captures a full timeline of clicks, network calls, and DOM snapshots for post-mortem debugging.

Prerequisites

Required:

  • Claude Pro subscription or Claude Code CLI
  • Node.js 18+ installed
  • Basic understanding of your application's user flows

What Claude handles automatically:

  • Installing Playwright and browser binaries
  • Generating test files with proper TypeScript types
  • Setting up test configurations and reporters
  • Writing selectors using accessibility snapshots
  • Debugging test failures with traces and screenshots
  • Optimizing tests for parallel execution

How to Use This Skill

Basic Test Generation

Prompt: "Create a Playwright test that logs into my application at localhost:3000, navigates to /dashboard, and verifies the welcome message appears."

Claude will:

  1. Install Playwright if not present (npm init playwright@latest)
  2. Generate a test file with proper page object patterns
  3. Use accessibility-first selectors (role, label, text)
  4. Include assertions with auto-retry logic
  5. Add screenshot capture on failure

AI-Powered Test Creation from User Stories

Prompt: "I have a checkout flow: user adds product to cart, enters shipping info, selects payment method, and completes order. Write comprehensive Playwright tests covering happy path and error cases."

Claude will:

  1. Break down the user story into discrete test scenarios
  2. Generate test files organized by feature
  3. Include data-driven tests with fixtures
  4. Add network mocking for payment gateway
  5. Implement custom assertions for order confirmation
  6. Set up test retry logic for flaky network calls

Cross-Browser Testing Suite

Prompt: "Set up Playwright to test my application across Chrome, Firefox, and Safari with parallel execution. Include mobile viewport testing for iOS and Android."

Claude will:

  1. Configure playwright.config.ts with multiple projects
  2. Define desktop and mobile browser contexts
  3. Set up parallel worker configuration
  4. Configure test sharding for CI/CD
  5. Add HTML reporter with trace viewer
  6. Include screenshot comparison for visual regression

API Testing Integration

Prompt: "Write Playwright tests that verify my REST API endpoints before running UI tests. Mock the API responses for offline testing."

Claude will:

  1. Use Playwright's request context for API calls
  2. Create API test fixtures for reusable setup
  3. Implement request/response interception
  4. Generate mock data with realistic values
  5. Set up contract testing with schema validation
  6. Add performance timing assertions

Tips for Best Results

  1. Use Accessibility Selectors: Playwright's MCP support leverages accessibility snapshots. Ask Claude to use getByRole(), getByLabel(), and getByText() instead of CSS selectors for more resilient tests.

  2. Parallel Execution: Playwright's native parallelism is a key advantage. Request test organization that maximizes parallel worker usage with proper test isolation.

  3. Auto-Wait Smart Defaults: Playwright automatically waits for elements to be actionable. Avoid explicit waits unless dealing with specific timing requirements.

  4. Trace on Failure: Enable trace recording for CI environments to debug failures without reproducing locally: --trace on-first-retry.

  5. Codegen for Complex Flows: For intricate user interactions, ask Claude to generate tests using npx playwright codegen output as a starting point.

  6. Test Sharding: For large test suites in CI, request sharding configuration: --shard=1/4 to split tests across multiple jobs.

Common Workflows

Complete E2E Test Suite Setup

"Set up a production-ready Playwright test suite for my Next.js app with:
1. Authentication flow tests with session storage
2. Visual regression testing with screenshot comparison
3. API mocking for external services
4. CI/CD integration with GitHub Actions
5. HTML report with trace viewer
6. Parallel execution across 4 workers"

AI-Assisted Test Maintenance

"My application's login form changed from using email to username.
Update all Playwright tests that interact with the login form,
using accessibility selectors instead of data-testid attributes."

Performance Testing

"Write Playwright tests that measure:
1. First Contentful Paint (FCP)
2. Largest Contentful Paint (LCP)
3. Time to Interactive (TTI)
4. Total Blocking Time (TBT)
Fail tests if any metric exceeds Web Vitals thresholds."

Mobile-First Testing

"Create Playwright tests for mobile web experience:
1. Test on iPhone 13 and Pixel 5 viewports
2. Verify touch interactions (swipe, pinch-to-zoom)
3. Test offline mode with service worker
4. Validate responsive image loading
5. Check mobile-specific navigation menu"

Troubleshooting

Issue: Tests are flaky and fail intermittently Solution: Ask Claude to add explicit waitForLoadState('networkidle') calls, increase timeout for specific actions with { timeout: 10000 }, or implement custom wait conditions with page.waitForFunction().

Issue: Selectors break when UI changes Solution: Request migration to accessibility selectors (getByRole, getByLabel) which are more resilient to DOM structure changes. Playwright's MCP integration makes this the preferred approach.

Issue: Tests run too slowly in CI Solution: Ask Claude to implement test sharding across multiple GitHub Actions jobs, optimize test setup with global authentication fixtures, and enable trace recording only on failure.

Issue: Cannot test third-party authentication (OAuth, SSO) Solution: Request implementation of authentication state storage with storageState option, bypassing the login flow for most tests while keeping one dedicated authentication test.

Issue: Screenshot comparison fails due to font rendering differences Solution: Ask Claude to configure Playwright's maxDiffPixels or threshold options, or use textual assertions instead of visual regression for text-heavy areas.

Learn More

Source citations

Add this badge to your README

Show that Playwright E2E Testing Automation Skill is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/skills/playwright-e2e-testing.svg)](https://heyclau.de/entry/skills/playwright-e2e-testing)

How it compares

Playwright E2E Testing Automation Skill side by side with its closest alternative on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Package trust, Source provenance).

Field

Write and maintain reliable end-to-end tests with Playwright — Microsoft's browser automation library that auto-waits for actionable elements and runs the same suite against Chromium, Firefox, and WebKit.

Open dossier

A Claude skill that fetches web pages, strips boilerplate with Mozilla Readability, respects robots.txt, removes duplicate content, and turns the result into structured summaries.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustDiffersPackage verified2025-10-16Package verified2025-10-15
Source provenanceDiffersSource-backedNo submission link
Submitter
Install riskReview firstLow risk
Notes Safety Privacy Safety Privacy
Brand
Categoryskillsskills
Sourcefirst-partyfirst-party
AuthorJSONboredJSONbored
Added2025-10-162025-10-15
Platforms
Claude CodeCodexWindsurfGeminiCursorCLI
Claude CodeCodexWindsurfGeminiCursorCLI
Source repo
Safety notes`npx playwright install --with-deps` downloads browser binaries (~500 MB for Chromium, Firefox, and WebKit) from Playwright's CDN and on Linux installs system-level packages. Review your network and environment policies before running in restricted infrastructure. Generated tests have full browser-level access to any URL they target. Review test scripts before running them against authenticated sessions or production environments — Playwright can submit forms, click buttons, and make network requests as a real user.Executes network requests to crawl third-party websites and installs scraping libraries (Playwright, BeautifulSoup) on first use; respect robots.txt, rate limits, and each site's terms of service, and review target URLs before running. Crawled pages are written to local files (Markdown, JSON, CSV); review output paths so the skill does not overwrite existing files.
Privacy notesPlaywright runs entirely on your local machine. Traces, screenshots, and HTML test reports are written to local disk only and are not uploaded to Microsoft or any external service. Trace files and failure screenshots may capture sensitive content from the application under test (form data, rendered PII, session tokens visible in URLs). Store and rotate these files appropriately.Fetches and stores content from external websites locally and may use site cookies or auth tokens to reach gated pages; do not crawl private or authenticated data without authorization, and keep any credentials out of saved output.
Prerequisites
  • Node.js 18+
  • Playwright 1.40+ with the @playwright/test package
  • Browser binaries installed via `npx playwright install` (Chromium, Firefox, WebKit)
  • A web application accessible for testing (local dev server, staging, or production URL)
  • Node.js 18+ or Python 3.11+
  • Playwright or Puppeteer (for JavaScript rendering)
  • readability or newspaper3k (for content extraction)
  • BeautifulSoup or Cheerio (for HTML parsing)
Install
npx playwright install --with-deps
curl -L https://heyclau.de/downloads/skills/website-crawler-summarizer.zip -o website-crawler-summarizer.zip && unzip -o website-crawler-summarizer.zip -d ./website-crawler-summarizer
Config
Citations
ClaimUnclaimedUnclaimed
Open in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.