Use this file to discover all available pages before exploring further.
Automatically scrolls through infinite scroll content by repeatedly scrolling to the bottom
until no new content loads or maximum scroll limit is reached.
import { scrollToLoadContent } from "@intuned/browser";import { BrowserContext, Page } from "playwright";interface Params {}export default async function handler( params: Params, page: Page, context: BrowserContext) { // Scroll through entire page content await page.goto("https://sandbox.intuned.dev/infinite-scroll"); await scrollToLoadContent({ source: page, }); // Will keep scrolling until the page has loaded all content or the maxScrolls is reached.}
Minimum height change in pixels required to continue scrolling. Defaults to 100.
If the page has loaded all content and we still haven’t reached the maxScrolls, the minHeightChange will detect that no new content is loaded and stop the scrolling.