glass_scroll_to_element
Scrolls a native GUI container until a target element is visible on-screen, using selectors like role, name, or value. Returns match status, elapsed time, and scroll details.
Instructions
Scroll until a semantic element is actually on-screen; returns matched, elapsed_ms, element and scrolled details. Sweeps the chosen/inferred direction, then reverses. No match after both ends or timeout returns matched:false; no tree errors. Batched use fails the sequence on an unmatched predicate. For 2+ known steps, use glass_do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Window-relative anchor x; supply both x/y for a container. Default target row/column, or window center if absent. | |
| y | No | Scroll anchor y (window-relative). See `x`. | |
| name | No | Substring of the target element's accessible name (selector). | |
| role | No | Element role filter, e.g. "ListItem", "Button", "Document" (selector). | |
| step | No | Wheel notches per step (default 3); large steps can skip realized rows. | |
| direction | No | up/down/left/right. Default infers off-screen direction, or down then up if absent. Reverses at the first end. | |
| timeout_ms | No | Timeout in ms (default 20000). Standalone: matched:false; batched: fails the sequence. | |
| description | No | Accessible-description substring; can select unnamed controls. | |
| value_contains | No | Value substring; requires name, description and/or role. |