Answers for "scrolling a page using node and puppeteer"

0

scrolling a page using node and puppeteer

const distance = 100;
const delay = 100;
const timer = setInterval(() => {
  document.scrollingElement.scrollBy(0, distance);
  if (document.scrollingElement.scrollTop + window.innerHeight >= document.scrollingElement.scrollHeight) {
    clearInterval(timer);
  }
}, delay);
Posted by: Guest on June-17-2021
0

scrolling a page using node and puppeteer

const distance = 100;
const delay = 100;
const timer = setInterval(() => {
  document.scrollingElement.scrollBy(0, distance);
  if (document.scrollingElement.scrollTop + window.innerHeight >= document.scrollingElement.scrollHeight) {
    clearInterval(timer);
  }
}, delay);
Posted by: Guest on June-17-2021

Code answers related to "scrolling a page using node and puppeteer"

Code answers related to "Javascript"

Browse Popular Code Answers by Language