# Test your web app in a real browser

> Clicking through the same flows after every change is slow, and bugs still slip through.

This setup is for developers and QA engineers who re-test the same user flows after every change. The agent drives a real browser through Microsoft's Playwright MCP server, follows the flow you describe in plain language, and reports what failed. You end up with a pass or fail report per flow and GitHub issues with steps to reproduce for anything broken.

## Steps

1. **Add Playwright MCP**: Register the Playwright MCP server in Claude Code or Cursor with the command npx @playwright/mcp@latest. The first run may ask you to install a browser; follow the prompt or run npx playwright install. Ask the agent to open your staging URL and describe the page to confirm it works.
   Tip: Add the --headless flag if you do not need to watch the browser.
2. **Describe the flow**: Describe the flow step by step in plain language: the URL, the test account, what to click or type, and what a correct result looks like. The agent reads the page through accessibility snapshots, so clear button labels and form field names help it find the right elements. Ask it to report each step as passed or failed, with the error text or a screenshot when something breaks.
   Tip: Write the expected result for each step, otherwise the agent has to guess what "working" means.
3. **File what fails**: Connect GitHub's MCP server with permission to create issues in your repository. Ask the agent to open one issue per failure with the steps to reproduce, the expected and actual result, the browser used and any console errors. Review each issue before approving the create call.
   Tip: Ask the agent to turn a flow that keeps breaking into a Playwright test file you can run in CI.

## Prompts to try

- Open https://staging.example.com, sign up with a new test email, confirm you land on the dashboard and report each step.
- Log in as test-buyer@example.com, add two items to the cart, apply code TEST10 and check the total updates. Report anything that fails.
- Fill the contact form with an invalid email and confirm the error message appears next to the field.
- Run the checkout flow again at a 375px wide viewport and tell me what breaks on mobile.
- For each failure, open a GitHub issue in acme/web with steps to reproduce and the console errors.

## What you need

- Node.js installed locally
- Claude Code or Cursor
- Staging environment and test accounts
- GitHub repository access to create issues

## Limits

- The agent can misread complex or poorly labelled pages and click the wrong element.
- Exploratory runs are slower and less repeatable than a scripted test suite.
- CAPTCHAs, two-factor prompts and email verification steps usually need a manual workaround.

## Security notes

- Run against staging, not production.
- Use test accounts, never real customer credentials.

## MCP servers

- [Playwright MCP Server](https://github.com/microsoft/playwright-mcp): browser-control
- [GitHub MCP Server](https://github.com/github/github-mcp-server): repository-read, issue-write, pull-request-write

## FAQ

**Does this replace my Playwright test suite?**

No. The agent explores flows from plain-language instructions, which helps for quick checks and new features. For checks that must run on every commit, ask it to write a Playwright test file and run it in CI.

**Which browsers can it use?**

Playwright MCP runs Chromium by default and can be configured to use Firefox, WebKit or an installed Chrome or Edge. Pick the browser in the server's command-line options.

**Is it safe to point at production?**

Run it against staging with test accounts. The agent really clicks buttons and submits forms, so on production it could place orders or send emails.

**Does it cost anything?**

Playwright and its MCP server are free and open source. You pay only for your AI host usage, such as Claude Code or Cursor.

## Tools

- **[GitHub](https://suiteintent.com/t/github?m=GB)**: Code hosting, issues and pull requests. · Best for: Teams reviewing code through pull requests · Free plan · 10000
