Scrolling Actions
Actions for scrolling the page vertically or horizontally.
scrollY
Scroll the page vertically.
Value: number (pixels — positive = down, negative = up)
{ "scrollY": 500 }
{ "scrollY": -300 }
Options
| Option | Type | Default | Description |
|---|---|---|---|
behavior | string | "smooth" | "smooth" for animated scroll, "instant" for immediate |
{
"scrollY": 1000,
"options": { "behavior": "instant" }
}
scrollX
Scroll the page horizontally.
Value: number (pixels — positive = right, negative = left)
{ "scrollX": 200 }
Options
| Option | Type | Default | Description |
|---|---|---|---|
behavior | string | "smooth" | "smooth" or "instant" |
Example: Scroll and Screenshot
{
"actions": [
{ "openNewTab": "https://example.com/long-page" },
{ "wait": 1000 },
{ "scrollY": 500 },
{ "wait": 500 },
{ "screenshot": "viewport" },
{ "scrollY": 500 },
{ "wait": 500 },
{ "screenshot": "viewport" }
]
}
Example: Full Page Scroll Down
{
"actions": [
{ "openNewTab": "https://example.com/infinite-scroll" },
{ "scrollY": 2000, "options": { "behavior": "smooth" } },
{ "wait": 2000 },
{ "scrollY": 2000, "options": { "behavior": "smooth" } },
{ "wait": 2000 },
{ "screenshot": "fullpage" }
]
}