The humanScroll
is designed to simulate human-like scrolling behavior on a web page using puppeteer. It includes a combination of smooth and random scrolling movements to mimic natural user behavior.
- This function is intended to be used with puppeteer for browser automation.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Example usage
const scrollActions = await humanScroll(page);
await scrollActions.scroll(3, 'down');
await browser.close();
})();