- Instant help with your JavaScript coding problems

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. 

Share "How to scroll to bottom of page in Puppeteer?"
Tags:
scroll, bottom, page, puppeteer
Technical term:
Scroll to bottom of page in Puppeteer