scrolling a page using node and puppeteer

Solutions on MaxInterview for scrolling a page using node and puppeteer by the best coders in the world

showing results for - "scrolling a page using node and puppeteer"
Alice
03 Jul 2020
1const distance = 100;
2const delay = 100;
3const timer = setInterval(() => {
4  document.scrollingElement.scrollBy(0, distance);
5  if (document.scrollingElement.scrollTop + window.innerHeight >= document.scrollingElement.scrollHeight) {
6    clearInterval(timer);
7  }
8}, delay);
9
similar questions
queries leading to this page
scrolling a page using node and puppeteer