Browser Testing with DevTools
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser.
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser.
Use Chrome DevTools MCP to give your agent eyes into the browser. Verify runtime behavior instead of guessing.
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--isolated"]
}
}
}
| Tool | What It Does | When to Use | |------|-------------|-------------| | Screenshot | Captures the current page state | Visual verification | | DOM Inspection | Reads the live DOM tree | Verify component rendering | | Console Logs | Retrieves console output | Diagnose errors | | Network Monitor | Captures network requests | Verify API calls | | Performance Trace | Records performance timing | Profile load time | | Element Styles | Reads computed styles | Debug CSS issues | | Accessibility Tree | Reads the accessibility tree | Verify screen reader experience |
1. REPRODUCE
└── Navigate to the page, trigger the bug
└── Take a screenshot
2. INSPECT
├── Check console for errors
├── Inspect the DOM element
├── Read computed styles
└── Check the accessibility tree
3. DIAGNOSE
├── Compare actual vs expected DOM
├── Compare actual vs expected styles
└── Identify the root cause (HTML? CSS? JS? Data?)
4. FIX
└── Implement the fix in source code
5. VERIFY
├── Reload the page
├── Take a screenshot
├── Confirm console is clean
└── Run automated tests
1. CAPTURE
└── Open network monitor, trigger the action
2. ANALYZE
├── Check request URL, method, and headers
├── Verify request payload
├── Check response status code
└── Inspect response body
3. DIAGNOSE
├── 4xx → Client sending wrong data
├── 5xx → Server error
├── CORS → Check origin headers
└── Timeout → Check server response time
4. FIX & VERIFY
└── Fix the issue, replay, confirm
1. BASELINE
└── Record a performance trace
2. IDENTIFY
├── Check LCP, CLS, INP
├── Identify long tasks (> 50ms)
└── Check for unnecessary re-renders
3. FIX
└── Address the specific bottleneck
4. MEASURE
└── Record another trace, compare
ERROR level:
├── Uncaught exceptions → Bug in code
├── Failed network requests → API or CORS issue
├── React/Vue warnings → Component issues
└── Security warnings → CSP, mixed content
WARN level:
├── Deprecation warnings → Future compatibility
├── Performance warnings → Potential bottleneck
└── Accessibility warnings → a11y issues
Clean Console Standard: A production-quality page should have zero console errors and warnings.
1. Read the accessibility tree
└── Confirm all interactive elements have accessible names
2. Check heading hierarchy
└── h1 → h2 → h3 (no skipped levels)
3. Check focus order
└── Tab through the page, verify logical sequence
4. Check color contrast
└── Verify text meets 4.5:1 minimum ratio
5. Check dynamic content
└── Verify ARIA live regions announce changes
After any browser-facing change: