Validate UI implementations using browser automation with Playwright MCP tools for real-time verification and test generation
From browser-automationnpx claudepluginhub citadelgrad/scott-cc --plugin browser-automationTriages messages across email, Slack, LINE, Messenger, and calendar into 4 tiers, generates tone-matched draft replies, cross-references events, and tracks follow-through. Delegate for multi-channel inbox workflows.
Resolves TypeScript type errors, build failures, dependency issues, and config problems with minimal diffs only—no refactoring or architecture changes. Use proactively on build errors for quick fixes.
Software architecture specialist for system design, scalability, and technical decision-making. Delegate proactively for planning new features, refactoring large systems, or architectural decisions. Restricted to read/search tools.
Validate implementations through real browser interaction, not assumptions. Prefer accessibility snapshots over screenshots for structural verification. Use the right tool for each scenario: MCP for quick checks during development, Playwright tests for formal regression suites.
Use these for quick verification during development:
| Tool | Purpose |
|---|---|
browser_navigate | Navigate to URLs |
browser_snapshot | Capture accessibility tree (preferred for validation) |
browser_take_screenshot | Visual screenshots |
browser_click, browser_type, browser_fill_form | Interact with elements |
browser_console_messages | Check for console errors |
browser_network_requests | Monitor API calls and failures |
browser_evaluate | Execute custom JavaScript |
Use these for creating and maintaining test suites:
# Run all tests
npx playwright test
# Run specific test file
npx playwright test tests/login.spec.ts
# Run with visible browser
npx playwright test --headed
# Update visual snapshots
npx playwright test --update-snapshots
# Generate HTML report
npx playwright show-report
# Create test plan from exploration
npx playwright planner --url https://your-app.com
# Generate tests from plan
npx playwright generator --plan test-plans/feature.md
# Auto-repair failing tests
npx playwright healer
Quick Bug Fix Validation (MCP)
browser_navigatebrowser_snapshotbrowser_console_messages for errorsNew Feature Verification (MCP + Screenshots)
Create Formal Tests (Test Agents)
Accessibility Validation
browser_snapshot to capture ARIA treeVisual Regression
toHaveScreenshot()// Structural, immune to styling changes
await expect(page.locator('nav')).toMatchAriaSnapshot(`
- navigation:
- link "Home"
- link "Products"
`);
await expect(page.locator('.error')).toBeVisible();
await expect(page.locator('h1')).toHaveText('Dashboard');
await expect(page.locator('button')).toBeEnabled();
await expect(page).toHaveScreenshot('homepage.png', {
maxDiffPixels: 100,
mask: [page.locator('.timestamp')]
});
const response = await page.waitForResponse('**/api/users');
expect(response.status()).toBe(200);
Quick, iterative validation without test overhead:
Formal test coverage for features:
Automated regression protection:
- run: npx playwright test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
Will:
Will Not: