query
Inspect a single UI element by ref, selector, text, or coordinates to get its label, selector, box, state, and optional text or HTML, including shadow roots and scoped containers.
Instructions
Details of one element: label, selector, box, state, and optionally its text or HTML (shadow root included).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Viewport x in CSS px (same as screenshot pixels at the default scale). | |
| y | No | Viewport y in CSS px. | |
| all | No | Count all matches. | |
| nth | No | Pick the nth match (0-based) when several match. | |
| ref | No | Ref from the last `snapshot` (e.g. "e12"). Most reliable. | |
| show | No | Default info. | |
| text | No | Visible text or label of the element (case-insensitive substring). | |
| exact | No | With `text`: require the whole label to match. | |
| within | No | Selector of a container to search in (e.g. a modal). | |
| selector | No | CSS selector. Searches inside every shadow root; use " >>> " to step into a specific shadow root. |