Use when asked to open the app in a browser and check that a flow works, click through a signup or checkout, reproduce a bug that shows in the browser, or capture the steps in screenshots. Asserts each step with Playwright and reports what passed, what failed and what was not checked. Not for a slow React page (optimize-react).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Test In Browser?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/heyvhuang-test-in-browser)
---
name: test-in-browser
description: "Use when asked to open the app in a browser and check that a flow works, click through a signup or checkout, reproduce a bug that shows in the browser, or capture the steps in screenshots. Asserts each step with Playwright and reports what passed, what failed and what was not checked. Not for a slow React page (optimize-react)."
license: Apache-2.0 (see LICENSE.txt and NOTICE)
---
# Test a web flow
## 1. Set up the run
Pick the entry route, test data, and visible outcome. Use the project's browser runner and fixtures when available. Use an isolated local or test environment for writes. Start the app with its documented command if needed, poll readiness with a timeout, and stop any process you started after the run.
## 2. Open a clean page
Open a clean browser context. Inspect the rendered page after its first relevant control is ready. Prefer locators by role and accessible name or label, scoped to the relevant form or region. Use Playwright's auto-waiting and assert the expected state directly. Pages with polling or streaming may never go idle.
## 3. Walk the flow
Walk the happy path and one relevant failure or retry. Assert the visible result at each transition. Where the outcome must persist, check it after reload or read it back from the test fixture. Capture screenshots after assertions at the widths that matter, 320 among them, and check that each region's content fits inside it, not only that the page does not scroll sideways. Use synthetic data and keep credentials and verification codes out of artifacts.
## 4. When a step fails
On failure, record the route, viewport, last passing step, and first failing assertion. Capture the current page and relevant console or request errors. If a fix is in scope, reproduce the failure before changing code, then rerun the same path and any neighboring path it affects.
## Report
Look at every screenshot before you report: text assertions pass over a broken layout. Report each fault you see; when fixing is in scope, reproduce it as an assertion that fails first, then fix it.
Report which outcomes passed, where each screenshot was taken, and which states remain unverified. See [example.md](example.md) for a reservation flow in four browser configurations at three widths.
Based on anthropics/skills (Apache-2.0), rewritten by Copybook.