Scroll to bottom of page in Puppeteer
Question:
How to scroll to bottom of page in Puppeteer? Answer:
await page.evaluate(() => {
window.scrollTo(0, window.document.body.scrollHeight);
});
Description:
The evaluate()
method in Puppeteer allows you to execute JavaScript code in the context of the page being controlled by Puppeteer.
Reference:
Puppeteer evaluate reference
Share "How to scroll to bottom of page in Puppeteer?"
Related snippets:
Tags:
scroll, bottom, page, puppeteer Technical term:
Scroll to bottom of page in Puppeteer