fix-browser-test

Diagnose and repair broken or flaky Playwright and Cypress browser tests.

1|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/pnewsam/skills --skill fix-browser-test-pnewsam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fix-browser-test
Source: https://github.com/pnewsam/skills/tree/main/archive/redundancy-evicted/fix-browser-test
Command: npx skills add https://github.com/pnewsam/skills --skill fix-browser-test-pnewsam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Browser tests break when selectors go stale, routes change, or timing becomes flaky, and fixing them by hand requires tedious reproduction and root-cause analysis. This Skill diagnoses one failing test file, applies a minimal repair, and verifies it passes. ## Core Features & Use Cases - Failure Diagnosis: Reproduces the failing test in isolation and classifies the root cause, such as stale selectors, changed routes, timing issues, or real application regressions. - Minimal Test Repair: Updates selectors, test helpers, or test config while preserving the intended assertion, preferring resilient role, label, and text selectors. - Feature Plan Sync: Marks the relevant criterion complete in docs/features browser-test plans only after the fixed test passes. - Use Case: A Playwright test that passed last week now fails after a UI rename. Point the Skill at the failing file, and it reproduces the failure, updates the selector, re-runs the test, and reports the root cause. ## Quick Start Fix the failing Playwright test in tests/checkout.spec.ts and verify it passes.

Frequently Asked Questions about fix-browser-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a flaky Playwright test?▼

Reproduce the failure by running the single test file with npx playwright test <path> --reporter=line, then classify the cause such as timing, stale selectors, or changed flows. Apply a minimal fix using resilient role, label, or text selectors and re-run the test to confirm it passes.

How to repair a broken Cypress test after a UI change?▼

Run the failing spec in isolation with npx cypress run --spec <path> and read the test file alongside the changed component. Update stale selectors or flow steps while preserving the original assertion, then verify the spec passes.

Should I change application code to make a failing test pass?▼

No. Only test files, test helpers, test config, and minimal selector attributes may be modified. If the failure reveals a real application regression, report the changed user-facing behavior instead of weakening the test.

What selectors are most resilient for browser tests?▼

Prefer role and name selectors, labels, and stable visible text, then test IDs as a fallback. Add a minimal selector attribute to application source only when no resilient option exists.

Why does a browser test fail only intermittently?▼

Intermittent failures usually come from timing and flakiness, auth or session setup, test-data dependencies, or environment configuration. Diagnose by reproducing the test in isolation and classifying the root cause before changing anything.