- Home
- Skills
- Testing & Debugging
- playwright e2e mcp
playwright e2e mcp
Run, diagnose, and self-heal Playwright E2E tests with trace-level insights and flakiness analysis.
Free
Works with the AI Agents you already use
playwright e2e mcp
Example session with this skill installed
The checkout test in tests/checkout.spec.ts is failing in CI. Can you find out why and try to fix it?
- Read your context and instructions
- Compiled the playwright e2e mcp
I have analyzed the failure in tests/checkout.spec.ts. The test failed due to a locator timeout because the "Complete Purchase" button was not found in the DOM.
Triage Result
| Test Case | Failure Kind | Root Cause |
|---|---|---|
checkout.spec.ts:42 | locator-timeout | getByRole('button', { name: 'Complete Purchase' }) matched 0 elements. |
The failure occurred because the UI now uses the text "Place Order" instead of "Complete Purchase". I have generated and verified a fix.
// tests/checkout.spec.ts
- await page.getByRole('button', { name: 'Complete Purchase' }).click();
+ await page.getByRole('button', { name: 'Place Order' }).click();
Next steps
- Review the locator change to ensure "Place Order" is the intended final label.
- Run
analyze-historyto check if this test has shown similar flakiness in other branches. - Commit the changes to resolve the CI failure.
Connects securely to your tools. The creator never sees your data.
About this skill
End-to-end testing often fails silently or results in "flaky" red builds that are hard to reproduce. This skill drives the playwright-e2e-mcp server to automate the discovery, diagnosis, and repair of broken Playwright tests.
What it does
- Automated Triage executes tests and groups failures by root cause to avoid redundant debugging.
- Trace-Based Diagnosis extracts the DOM state, failed network requests, and console logs at the exact moment of failure.
- Self-Healing Fixes identifies broken locators and applies verified code changes that re-run automatically to confirm the fix.
- Flakiness Analysis detects tests sensitive to execution order, parallelism, or timing races through isolated repetition.
- CI Report Integration downloads and analyzes artifacts from GitHub Actions or GitLab to diagnose failures that only occur in remote environments.
- Web Audits performs accessibility and performance checks against signed-in pages and complex user flows.
How it works
- Run uses
run-testto execute specific files or failing suites, returning structured results instead of raw logs. - Analyze calls
get-failureto inspect the trace, DOM snapshot, and failure kind for a specific test index. - Repair invokes
suggest-fixto generate a diff for a missing element or broken selector, then verifies the change. - Monitor utilizes
analyze-historyto track regressions and pass/fail trends across different git commits.
Frameworks & tools
Specifically designed for Playwright (Node.js and Python) via the playwright-e2e-mcp server. It integrates with GitHub Actions, GitLab CI, axe-core for accessibility, and standard browser engines.
Why this beats prompting it yourself
Standard LLMs cannot see the live browser state or network traffic during a test failure. This skill bridges that gap by giving the agent direct access to traces, interactive page inspection, and the ability to verify its own fixes before committing them.
Use cases
- Fix a regression by bisecting git history to find the exact commit that broke a test.
- Debug an intermittent failure that only happens when tests run in parallel.
- Generate new E2E tests by recording a manual flow and converting it to verified locators.
- Audit the accessibility and Web Vitals of a checkout flow behind a login wall.
Known limitations
Requires the playwright-e2e-mcp server to be installed and running. Accessibility and performance audits are restricted to Chromium-based engines. Locators and visual baselines require a local browser environment.
Requires playwright-e2e-mcp server 0.2.0+. Performance audits are Chromium-only. Server must have access to project root and CI tokens for remote report downloads.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
2 uses
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 14 days ago
- Free with an Agensi account
Requires