scroll
Move the page or a container up/down by pixels or jump to top/bottom, bring elements into view, and trigger lazy or infinite loading. Returns position with atTop/atBottom flags.
Instructions
Scroll the page: scroll down or up by pixels, jump to the top or bottom, or scroll an element into view (to the middle of the screen). Also scrolls inside a scrollable container (chat panels, tables, sidebars with their own scrollbar) when you pass that container as selector/ref together with to or deltaX/deltaY. Returns the scroll position with atTop/atBottom flags. For lazy-loaded or infinite-scroll pages ('load more' on scroll), scroll to the bottom, wait_for_element for the new items, and repeat until atBottom stays true and nothing new appears. click and type already scroll their target into view, so use this to reveal content or trigger lazy loading.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Jump to the top or bottom of the page, or of the container given by selector/ref. Scrolling to the bottom is how infinite-scroll pages load more items. | |
| ref | No | Element ref from capture_page (e.g. 'e12'); same meaning as selector. | |
| deltaX | No | Pixels to scroll horizontally: positive = right, negative = left. | |
| deltaY | No | Pixels to scroll vertically: positive = down, negative = up (e.g. 800 for about one screen). | |
| selector | No | Element to scroll to, brought to the middle of the screen. If you also pass to or deltaX/deltaY, this element is instead the scrollable container to scroll inside. Provide selector or ref, not both. | |
| timeoutMs | No | How long to wait for the selector/ref element to exist, in milliseconds (default 10000). |