Spotted something off?Report on Discord
guides
Scroll
Simulate scrolling to an element or the bottom of the page to trigger lazy-loaded content during automation.
Updated May 28, 2025
Perform a scrolling action either to a specific element or to the bottom of the page β useful for loading dynamic content or triggering lazy-loaded elements.
Command
"scroll"
Use this command to simulate user-like scrolling behavior during scraping or automation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cssSelector |
string | No | The CSS selector of the element to scroll to. If omitted, the page will scroll to the bottom by default. |
repeat |
number | No | Number of times to repeat the scroll. This enables infinite scrolling behavior. |
delayMs |
number | No | Delay between each scroll in milliseconds β useful for waiting on content to load between scrolls. |
Example
bash14 lines
Notes
Use Case Ideas:
- Load more search results on websites with infinite scroll.
- Trigger lazy-loaded images or content blocks.
- Scroll to a form or button before interacting with it (e.g., clicking or typing).
Tips:
- Combine with
waitForSelectorafter scroll to ensure the element has loaded before scraping. - Use high
repeatcounts + delay for deep content loading. - Can be combined with
iforwhilebrowser actions for intelligent scrolling.
Related concepts
Go deeper in the Scrappey knowledge base:
- Scraping infinite-scroll pages β loading content as you scroll
- Dynamic content scraping β working with interactive pages