Scroll
scrollBrings elements into view and moves the page or an element by direction or pixel amount with real mouse-wheel events, including in background tabs where Chrome ignores wheel events.
Instructions
Scrolls an element into view (ref), or scrolls the page or the element under a point by a direction/amount using real mouse-wheel events (with script in a background tab, where Chrome ignores wheel events).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Viewport X of the element to scroll (default: viewport center). | |
| y | No | Viewport Y. | |
| ref | No | Element ref from page_snapshot or find, e.g. "e12". | |
| tabId | No | Tab to act on. Defaults to the session target tab (see tab_select). | |
| amount | No | Pixels to scroll (default: 80% of the viewport). | |
| toEdge | No | Scroll the page to its very top or bottom. | |
| direction | No | Scroll direction. |