---
name: browser-qa-session-script
description: "Reproduces a bug in a real browser, captures evidence, writes the regression test, and verifies the fix against it. Use when a QA engineer or developer has a bug seen in the browser and needs it reproduced with evidence, a regression test, and a verified fix. Do not use for load testing or exploratory testing with no specific bug. Related topics: coding, technical."
---

# Browser QA Session Script

Reproduces a bug in a real browser, captures evidence, writes the regression test, and verifies the fix against it.

## When to use

Use this skill when a QA engineer or developer has a bug seen in the browser and needs it reproduced with evidence, a regression test, and a verified fix. Do not use it for load testing or exploratory testing with no specific bug.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Follow the reported steps in a real browser while watching console and network, and vary one factor at a time if it does not reproduce.
3. Capture a screenshot, console text, the failing request, and the minimal steps once the bug appears.
4. Write a regression test that fails for the reason described in the report.
5. Apply or review the fix and rerun the test until it passes.
6. Rerun neighbouring tests and report results from before and after the fix.

## Inputs

- **Bug report** (longer free text)
- **Steps to reproduce** (longer free text)
- **Environment** (free text, e.g. "Browser and version and device")
- **App URL or local command** (free text, e.g. "Where to run it")
- **Test framework** (choose one: Playwright, Cypress, Selenium, Testing Library)
- **Test account type** (free text, e.g. "Role only and never credentials")

## Output

A report with minimal reproduction steps, the evidence, root cause, the regression test code, and test results before and after the fix.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Browser QA Session Script

Reproduce and pin down this browser bug.

- Bug report: {{Bug report}}
- Steps to reproduce: {{Steps to reproduce}}
- Environment: {{Environment}}
- App URL or local command: {{App URL or local command}}
- Test framework: {{Test framework}}
- Test account type: {{Test account type}}

Follow the steps in a real browser and watch the console, network panel, and page. If the bug does not reproduce, vary one thing at a time (browser, viewport, account role, data) and record which change matters. Once reproduced, capture evidence: a screenshot, the console error text, the failing request with status, and the shortest set of steps. Write a failing regression test in the chosen framework that encodes the bug and fails for the right reason. Only then apply or review the fix, rerun the test until it passes, and rerun the nearby tests to catch side effects. Finish with a report: reproduction steps, evidence, root cause, the test file, and the test run result before and after.

## Pitfalls

- Writing the test after the fix, so it never proves it can fail.
- Testing in a browser that differs from the reporter's, then declaring the bug unreproducible.
- Asserting on an incidental element so the test passes while the bug still exists.
