Playwright Autopilot

Playwright Autopilot

playwright-autopilot•bykaizen-yutani

A Claude Code plugin exposing an MCP server of tools that run Playwright E2E tests with full action capture, investigate failures, and explore applications in a real browser.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Captures before/after DOM snapshots, network requests, console output, and screenshots for every browser action during a test run.
  • •Provides interactive browser tools that launch a real Chrome instance to navigate, click, type, fill forms, and capture ARIA snapshots.
  • •Detects flaky tests using per-process retries or native repeat-each stress runs.
  • •Packages all failure evidence into a single response for triage and reporting.

BEST FOR

  • •Debugging failing Playwright E2E tests by inspecting real page state, failed API calls, and action timelines.
  • •Triaging an entire test suite by classifying failures and generating management-ready reports.
  • •Finding test coverage gaps in untested page object methods and uncovered flow steps.

ABOUT PLAYWRIGHT-AUTOPILOT

Playwright Autopilot is cataloged as an MCP server attributed to kaizen-yutani. A Claude Code plugin exposing an MCP server of tools that run Playwright E2E tests with full action capture, investigate failures, and explore applications in a real browser. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Playwright Autopilot are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does Playwright Autopilot modify Playwright's source code?

No; it injects a capture hook into Playwright's test worker processes without modifying Playwright's source.

How does the plugin avoid using excessive context?

It exposes tools that Claude calls on-demand, pulling only the specific data it needs instead of dumping entire traces.

Upstream README

View this exact version on GitHub

README.md · 2cd4237cd329 · Fetched 2026-11-13 14:08:26 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Playwright Autopilot

Using Selenium, Cypress, or WebDriverIO? E2Epilot brings the same AI triage engine to 6 frameworks — including Selenium Java, SeleniumBase, and more. Website: e2epilot.com | npm: @e2epilot/cli

A Claude Code plugin that debugs and fixes Playwright E2E tests autonomously. It runs your tests with full action capture — DOM snapshots, network requests, console output, screenshots — then investigates failures like a senior QA engineer and ships the fix.

https://github.com/user-attachments/assets/26f734a5-d05e-41c9-bc3f-2b58561c2ce0

Quick Start

# Add the marketplace
/plugin marketplace add kaizen-yutani/playwright-autopilot

# Install the plugin
/plugin install kaizen-yutani/playwright-autopilot

Then ask Claude to fix a failing test or triage your whole suite:

/playwright-autopilot:fix-e2e tests/checkout.spec.ts
/playwright-autopilot:triage-e2e e2e

Or just describe what you need — Claude will use the MCP tools automatically:

Fix all failing e2e tests in the "e2e" project

What It Does

Every browser action during a test run is captured with:

  • Before/after DOM snapshots — aria tree of the page before and after each click, fill, navigation
  • Network requests — URL, method, status, timing, request/response bodies
  • Console output — errors, warnings, logs tied to the action that produced them
  • Screenshots — captured at point of failure

When a test fails, Claude doesn't guess — it reads the actual page state, checks for failed API calls, and traces the root cause through the action timeline.

How It Works

1. Capture Hook

A lightweight CJS hook (captureHook.cjs) is injected via NODE_OPTIONS --require into Playwright's test worker processes. It monkey-patches BrowserContext._initialize to add an instrumentation listener that captures every browser action with full context. No modifications to Playwright's source code required — works with any Playwright installation.

2. MCP Tools

The plugin exposes 37 tools via the Model Context Protocol that Claude calls on-demand. This is token-efficient by design — instead of dumping entire traces into context, Claude pulls only what it needs:

Test Execution & Debugging:

ToolPurpose
e2e_list_projectsList Playwright projects from config
e2e_list_testsDiscover test files and cases
e2e_run_testRun tests with action capture, flaky detection (retries, repeatEach)
e2e_get_failure_reportError + DOM + network + console summary
e2e_get_evidence_bundleAll failure evidence in one call — ready for Jira
e2e_generate_reportSelf-contained HTML or JSON report file
e2e_suggest_testsTest coverage gap analysis
e2e_get_actionsStep-by-step action timeline
e2e_get_action_detailDeep dive into a single action
e2e_get_dom_snapshotAria tree before/after an action
e2e_get_dom_diffWhat changed in the DOM
e2e_get_networkNetwork requests with filtering
e2e_get_consoleConsole output with filtering
e2e_get_screenshotFailure screenshot as image
e2e_get_test_sourceTest file with failing line highlighted
e2e_find_elementsSearch DOM for specific elements
e2e_scan_page_objectsIndex all page objects and methods
e2e_get_app_flowsRead stored application flows
e2e_save_app_flowSave a verified user journey
e2e_get_contextFlows + page object index in one call
e2e_discover_flowsAuto-scan specs for draft flow map
e2e_build_flowsAuto-run uncovered tests and save their flows
e2e_get_statsSuite health dashboard: pass rate trends, flaky scores, category breakdowns
e2e_save_triage_runSave a categorized triage run for trend tracking
e2e_get_triage_configRead triage settings (Jira config, flaky threshold)

Interactive Browser Exploration:

ToolPurpose
browser_navigateOpen a URL (launches browser automatically)
browser_navigate_backGo back in browser history
browser_snapshotCapture ARIA accessibility tree with [ref=X] markers
browser_clickClick an element by ref
browser_typeType into an input field, optionally submit
browser_fill_formFill multiple form fields in one call
browser_select_optionSelect a dropdown option
browser_press_keyPress a key (Enter, Escape, Tab, etc.)
browser_hoverHover over an element
browser_take_screenshotCapture a PNG screenshot
browser_set_headersSet custom HTTP headers (same-origin only for CORS safety)
browser_closeClose the browser

The browser_* tools launch a real Chrome instance and let Claude explore your application interactively — navigate pages, click elements, fill forms, and observe page state through ARIA snapshots. Each interaction returns timing, network requests, DOM changes, and an updated snapshot. Use this to understand an app before writing tests, debug UI issues visually, or verify fixes.

3. Flow Memory

After fixing (or verifying) a test, the plugin saves the confirmed application flow — the sequence of user interactions that make up the happy path. These flows persist in .e2e-flows.json and accumulate across sessions.

Next time that test breaks, Claude already knows the intended user journey and jumps straight to identifying what changed. The agent gets faster over time.

4. Flaky Detection

Two complementary modes for identifying flaky tests:

retries: N — Run the test N+1 times in separate Playwright processes. Each run gets its own runId with full action capture. Returns a verdict: FLAKY, CONSISTENT PASS, or CONSISTENT FAIL. Best for debugging with 2-3 retries.

e2e_run_test(location: "tests/checkout.spec.ts:15", retries: 2)

repeatEach: N — Native Playwright --repeat-each. All iterations in one process. Fast stress-test for confirming flakiness — use 30-100 for confidence.

e2e_run_test(location: "tests/checkout.spec.ts:15", repeatEach: 40)

5. Evidence Bundles

e2e_get_evidence_bundle packages all failure evidence into a single response — error, steps to reproduce, action timeline, failed network requests with bodies, console errors, DOM snapshot, and screenshots. Replaces calling 6+ tools separately.

Pass outputFile: true to write a markdown file to test-reports/ for Jira attachments.

6. HTML Reports

Batch runs (no location) automatically generate a self-contained HTML report with:

  • Pass/fail summary with status badges
  • Collapsible per-test sections
  • Action timelines, failed network requests, console errors
  • DOM snapshots at failure points
  • Screenshots as inline base64 images

Reports are written to test-reports/report-<runId>.html. You can also call e2e_generate_report manually for any run.

7. Suite Triage & Health Tracking

Run your entire suite, classify every failure, and produce a management-ready report:

/playwright-autopilot:triage-e2e e2e

Claude classifies each failure as Known Issue, App Bug, Test Update, Flaky, or New Failure — cross-references Jira for existing tickets, creates new tickets for app bugs with evidence bundles, and saves the triage run for trend tracking.

e2e_get_stats provides a suite health dashboard — pass rate trends, flaky tests ranked by score, failure category breakdowns, and new failures — all from local history without running tests.

9. Coverage Analysis

e2e_suggest_tests scans your entire project to find coverage gaps:

  1. Untested page object methods — methods in .page.ts / .service.ts files that no spec calls
  2. Missing flow variants — flows with pre-conditions (e.g. "no draft exists") that lack a continuation variant
  3. Uncovered flow steps — actions listed in confirmed flows that no spec exercises

10. Architecture Awareness

Before writing any fix, the plugin scans your project for page objects, service layers, and test fixtures. It follows your existing patterns:

  • Uses your Page Object Model methods instead of writing raw Playwright calls
  • Respects your business/service layer separation
  • Uses getByRole(), getByTestId(), web-first assertions
  • Produces minimal diffs — typically one or two lines added

Debugging Philosophy

The plugin follows a strict diagnostic methodology:

Think in user flows, not selectors. Before touching code, it maps the intended user journey. When a step is missing — a dropdown never selected, a required field never filled — it finds the existing page object method and adds the call.

Four root cause categories:

  1. Missing test step — the test skips a UI interaction the app requires
  2. Test code bug — wrong selector, stale assertion, bad test data
  3. Application bug — the app itself is broken (reported, not worked around)
  4. Dirty state — leftovers from previous test runs interfering

No hacks. The plugin will never use page.evaluate(), page.route(), page.addInitScript(), or any JavaScript injection to work around a failing test. If the fix requires those, it's solving the wrong problem.

Configuration

Multi-project setup

If your Playwright project lives in a different directory than where Claude Code runs, set the PW_PROJECT_DIR environment variable in .mcp.json:

{
  "mcpServers": {
    "playwright-autopilot": {
      "command": "node",
      "args": ["path/to/plugin/server/mcp-server.js"],
      "env": {
        "PW_PROJECT_DIR": "/path/to/your/playwright/project"
      }
    }
  }
}

Requirements

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Playwright Autopilot from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/playwright-autopilot)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools