Inspect live page DOM
inspect-pageOpen a URL headlessly to map elements with unique Playwright locators, CSS selectors, visibility, text, and console logs. Run actions or stored sessions to view signed-in states.
Instructions
Open a URL headlessly and return its elements with Playwright locators proven unique on the page (role + name first), CSS selectors, visibility, text and console messages. storageState/headers open it signed in; actions click/fill first to reach a state. view 'locators' is the compact map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Full URL of the page to open (http/https) | |
| view | No | 'locators': compact map of interactive elements (cheapest); 'elements' (default): DOM inventory | |
| actions | No | Steps run after load to reach a state (modal, step 3) | |
| headers | No | Extra HTTP headers, e.g. Authorization | |
| waitFor | No | Wait for this selector first | |
| selector | No | CSS selector: inspect matches instead of the whole DOM | |
| viewport | No | ||
| timeoutMs | No | Overall inspection limit in ms (default 45000) | |
| waitUntil | No | Navigation wait condition (default domcontentloaded) | |
| includeHtml | No | Include the rendered HTML (truncated) | |
| projectRoot | No | Project whose Playwright launches the browser (default: server root) | |
| maxHtmlChars | No | HTML cap when includeHtml is set (default 20000) | |
| storageState | No | Logged-in session: storageState JSON inside the project, e.g. playwright/.auth/user.json |