e2e_analyze
Analyzes a page's interactive elements and returns CSS selectors plus test scaffolds, replacing manual screenshot-guessing so you can build E2E tests in one call.
Instructions
Analyze a page's structure and return all interactive elements (forms, buttons, links, navigation, tables, modals, etc.) with their CSS selectors, plus suggested test scaffolds. One call replaces the entire screenshot→guess-selectors→retry cycle.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "e2e_analyze"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Project root directory (defaults to the current working directory). | |
| url | Yes | Full URL to analyze (e.g. "https://example.com" or "http://host.docker.internal:3000/dashboard") | |
| delay | No | Wait N milliseconds after page load before analyzing (default: 0) | |
| scope | No | CSS selector to limit analysis to a section (e.g. "#sidebar", ".modal-content") | |
| selector | No | Wait for this CSS selector before analyzing | |
| authToken | No | JWT or auth token to inject into localStorage before navigating (for authenticated pages) | |
| waitUntil | No | Navigation wait strategy. "auto" (default) tries networkidle2 first with a short timeout, then falls back to domcontentloaded + delay for SPA/WebSocket apps. Use "domcontentloaded" for apps with persistent connections (WebSocket, SSE). | |
| maxElements | No | Max elements per category (default: 50). Lower values produce smaller responses. | |
| authStorageKey | No | localStorage key name for the auth token (default: "accessToken") | |
| includeScreenshot | No | Include a screenshot alongside the JSON analysis (default: true) |