Scroll Actions
Humanized scrolling that mimics real user behavior. Desktop scrolls use the trusted wheel driver (small incremental movements like a real mousewheel). Mobile scrolls use touch events. All scrolling goes through the trusted input drivers — never raw JS scrollBy.
scroll
Scroll the page by a fixed pixel distance using the trusted scroll driver.
| Param | Type | Description |
|---|---|---|
| amountoptional | number | Pixels to scroll. Default: 500. Also accepts pixels. |
| directionoptional | string | "down" (default) or "up". |
// Scroll down 500px (default)
{ "type": "scroll" }
53
{ "type": "scroll", "amount": 800, "direction": "down" }
132
{ "type": "scroll", "amount": 300, "direction": "up" }scroll_to_element
Scrolls until a specific element is visible on screen. Uses the trusted scroll driver and the engine's visibility check to find the target. Throws a step-retry error if the element is not found.
| Param | Type | Description |
|---|---|---|
| selectorrequired | string | string[] | CSS selector(s) for the element to scroll to. |
| indexoptional | number | Which visible match to target (0 = first). Default: 0. |
{ "type": "scroll_to_element", "selector": "#submit-section" }
{ "type": "scroll_to_element", "selector": ".pricing-table", "index": 0 }scroll_to_bottom
Incrementally scrolls to the bottom of the page with pauses between scrolls. Stops when the bottom is reached or the max scroll count is hit.
| Param | Type | Description |
|---|---|---|
| maxScrollsoptional | number | Maximum number of scroll iterations. Default: 20. Also accepts max_scrolls. |
| waitBetweenoptional | number | Delay between scroll iterations in ms. Default: 1000. Also accepts wait_between. |
// Scroll to bottom with defaults (20 scrolls, 1s between)
{ "type": "scroll_to_bottom" }
91
{ "type": "scroll_to_bottom", "maxScrolls": 10, "waitBetween": 500 }scroll_horizontal
Horizontal scroll on a specific element or the whole page. Positive values scroll right, negative values scroll left.
| Param | Type | Description |
|---|---|---|
| selectoroptional | string | string[] | Scrollable container selector. If omitted, scrolls the page. |
| deltaXoptional | number | Pixels to scroll horizontally. Positive = right, negative = left. Default: 300. Also accepts delta_x or amount. |
| indexoptional | number | Which visible match to target (0 = first). Default: 0. |
// Scroll right 300px on the page
{ "type": "scroll_horizontal", "deltaX": 300 }
82
{ "type": "scroll_horizontal", "selector": ".carousel", "deltaX": -400 }
182
{ "type": "scroll_horizontal", "selector": ".horizontal-list", "amount": 500 }scroll_infinite
Infinite scroll — keeps scrolling down and checking for new content until no more loads or the max iteration count is reached. The driver monitors for new content appearing after each scroll.
| Param | Type | Description |
|---|---|---|
| selectoroptional | string | Content container selector to monitor for new items. If omitted, monitors the page. |
| maxScrollsoptional | number | Maximum scroll iterations. Default: 30. Also accepts max_scrolls. |
| waitForNewoptional | number | How long to wait for new content after each scroll in ms. Default: 2000. Also accepts wait_for_new. |
// Infinite scroll with defaults
{ "type": "scroll_infinite" }
64
{ "type": "scroll_infinite", "selector": ".product-grid", "maxScrolls": 50 }
178
{ "type": "scroll_infinite", "maxScrolls": 20, "waitForNew": 3000 }