scroll
Scroll the page or a container by a pixel amount in any direction, or bring an element into view. Returns the new position and max scroll so you can detect when the end is reached.
Instructions
Scroll the page, or a scrollable container, by an amount in a direction; or scroll a given element (ref, selector or match) into the centre of the view. Returns the new scroll position and the maximum scroll, so you can tell when you reached the end. Use it for lazy-loaded or long pages; click and hover already scroll their target into view, so you rarely need it for those.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref from the latest snapshot or find, e.g. "e12". Preferred: unambiguous and fastest; stale after navigation. | |
| tab | No | Tab id from tabs_list. Defaults to the current tab. | |
| match | No | Visible text or accessible name to match (case-insensitive substring), e.g. "Sign up"; use when you have no ref. | |
| amount | No | Distance in CSS pixels (default 600). | |
| within | No | CSS selector of a scrollable container (e.g. a modal or list) to scroll instead of the window. | |
| selector | No | CSS selector; the first matching element is used. | |
| direction | No | Scroll direction (default down). Ignored when an element is given. |