async function screenshotPageWithoutScroll(url) {
  const context = await browser.createIncognitoBrowserContext();

  const page = await context.newPage();

  // Set viewport height to same as the page when it's completely scrolled
  // so final screenshot is same height.
  // const viewport = Object.assign({}, DEFAULT_VIEWPORT);
  // viewport.height = maxScrollHeight;
  // await page.setViewport(viewport);

  // Prevent page from scrolling.
  // page.on('console', msg => console.log(msg.text()));
  // await page.evaluate(() => {
  //   document.addEventListener('scroll', e => {
  //     console.log('scroll!');
  //     e.stopImmediatePropagation();
  //     e.stopPropagation();
  //   });
  // });

  await page.goto(url, {waitUntil: 'networkidle2'});
  await page.waitFor(WAIT_FOR); // Wait a bit more in case other things are loading.
  // await waitForNetworkIdle(page, 'networkidle0'); // wait for network to be idle.
  const buffer = await page.screenshot({
    path: argv.save ? argv.noscroll : null,
    fullPage: true
  });
  await context.close();
  return buffer;
}
Verifies that images on the page which are lazy loaded do not use scroll
events to do so. This can present a problem for search crawlers discovering
the images on a page.

Usage:

    node lazyimages_without_scroll_events.js -h
    // PASSES. Uses IntersectionObserver and lazyimages.js checks image visibility on page load without needing scroll events.
    node lazyimages_without_scroll_events.js --url=https://rawgit.com/GoogleChromeLabs/puppeteer-examples/master/html/lazyload.html
    // FAILS. uses scroll events.
    node lazyimages_without_scroll_events.js --url=https://css-tricks.com/examples/LazyLoading/
    // FAIL. Uses scroll events.
    node lazyimages_without_scroll_events.js --url=http://dinbror.dk/blazy/ -o results.html --save