Skip to main content

Scrolling Actions

Actions for scrolling the page vertically or horizontally.

scrollY

Scroll the page vertically by a number of pixels. Positive scrolls down, negative scrolls up.

Value: number (pixels)

[
{ "scrollY": 500 }
]

Scroll back up:

[
{ "scrollY": -300 }
]

Scroll to bottom of page — using a large number works because the browser clamps the scroll position to the maximum scrollable distance:

[
{ "scrollY": 99999 }
]

Instant (no animation):

[
{ "scrollY": 1000, "options": { "behavior": "instant" } }
]

Options

OptionTypeDefaultDescription
behaviorstring"smooth""smooth" for animated scroll, "instant" to jump immediately

scrollX

Scroll the page horizontally by a number of pixels. Positive scrolls right, negative scrolls left.

Value: number (pixels)

[
{ "scrollX": 200 }
]

Scroll back left:

[
{ "scrollX": -200 }
]

Options

OptionTypeDefaultDescription
behaviorstring"smooth""smooth" for animated scroll, "instant" to jump immediately

Example: Scroll Down to Load More Items

[
{ "openNewTab": "https://example.com/feed" },
{ "waitForEvent": "networkidle" },
{ "scrollY": 800 },
{ "waitForElement": ".load-more-spinner", "options": { "visible": true } },
{ "waitForEvent": "networkidle" },
{ "extractAll": [".post", { "title": "h2", "link": ["a", "href"] }] }
]