title: Puppeteer full page screenshot, getting extra white space rendered at bottom of page
body: <p>I'm playing with <strong>Puppeteer v1.3.0</strong> to generate some screenshots at various breakpoints during build/deploy.  I don't seem to understand how to generate a full page screenshot properly.</p>
  
  <p>I can get a full page screenshot exactly as I want it, <strong>but I have to set the viewport dimensions twice</strong> which seems very odd to me (I just set an arbitrary height, then evaluate the clientHeight):</p>
  
  <pre><code>//xl
  await page.setViewport({
      width: 1201,
      height: 600
  });
  await page.setViewport({
      width: 1201,
      height: await page.evaluate(() =&gt; document.body.clientHeight),
      isMobile: true //whether the meta viewport tag is taken into account
  });
  await page.screenshot({path: 'xl.png');
  </code></pre>
  
  <p>I've tried setting waitUntil networkidle, just evaluating the clientHeight and setting fullPage to true in the page.screenshot:</p>
  
  <pre><code>await page.goto('my-url-here', {
      waitUntil: 'networkidle2'
  });
  await page.setViewport({
      width: 1201,
      height: await page.evaluate(() =&gt; document.body.clientHeight),
      isMobile: true //whether the meta viewport tag is taken into account
  });
  await page.screenshot({path: 'arrowdental_xl.png', fullPage: true});
  </code></pre>
  
  <p>And I get a full page screenshot, but <strong>there's a bunch of extra white space at the bottom</strong>, which I don't want.</p>
  
  <p>What's the proper way to get a full page screenshot in Puppeteer?  Again, the first method above works, but it feels dumb I have to set the viewport dimensions twice. I'd like to have cleaner code, if possible.</p>