Playwright Testing Skill for API Failure Recovery
Control network responses in your local frontend test and verify that a visible retry action recovers the page.
中文Install in Claude Code
Use your local frontend, Playwright Test, and a test browser. Intercept only the project's own request in the example.
- Get the complete `skills/playwright-testing` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/playwright-testing/SKILL.md`, start Claude Code at the project root, and call `/playwright-testing`.
Example task
Intercept local /api/catalog and return 503 on the first call, then a JSON fixture containing Demo Mug. Open the catalog, click Retry after the error, and verify the item.What to check
The test reliably covers failure and recovery. After retry, the error clears and Demo Mug appears.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should I sleep while waiting for the error UI?
Use Playwright's retrying assertions on a visible state such as the Retry button or item name.