inspect_element
Check if a DOM element exists on a page and get its bounding box, size, and visibility via Chrome DevTools Protocol to verify layout or catch UI regressions.
Instructions
Inspect a DOM element on a webpage via CDP: check if it exists, its computed physical bounding box (x, y, width, height), and whether it is currently visible.
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>",
"selector": "<selector>"
},
"name": "inspect_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target webpage URL | |
| delay | No | Delay in milliseconds before inspecting (default: 500) | |
| width | No | Viewport width in pixels (default: 1920) | |
| height | No | Viewport height in pixels (default: 1080) | |
| waitFor | No | Optional CSS selector to wait for before inspecting | |
| selector | Yes | CSS selector of the DOM element to inspect |