pilot_scroll
Scroll a page or element into view using a reference or CSS selector. Scroll by direction (up, down, top, bottom) when no reference is provided.
Instructions
Scroll the page or a specific element into view. Use when the user wants to scroll down a long page, scroll to the bottom, scroll to the top, or scroll a specific element into the viewport. With a ref, scrolls the element into view. Without a ref, scrolls the page by one viewport height or to a specific position.
Parameters:
ref: Element reference from snapshot (e.g., "@e20") or CSS selector to scroll into view (omit for page scroll)
direction: Page scroll direction when no ref is provided — "up", "down", "top", or "bottom" (default: "bottom")
Returns: Confirmation of what was scrolled and in which direction.
Errors:
"Element not found": The ref is stale. Run pilot_snapshot to get fresh refs.
Timeout (5s): The element could not be scrolled into view.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref or CSS selector to scroll into view | |
| direction | No | Scroll direction (when no ref) |