title: How to capture entire page screenshot with Selenium and C#
body: <p>I am using the following method to take screenshots and noticed that all of the screenshot images are not capturing the full window but instead cropping the window. For example I will get a .jpg where I cannot see the entire webpage that is visible on the screen. I suspect that this happens when certain elements are not visible in the DOM and therefore not included in the screenshot. Is this expected behavior? If this is expected, is there a way to program the driver to take a full screen capture with the Selenium 32 bit Internet Explorer Driver consistently? Here is the method I am calling to take the screenshots. </p>
  
  <pre><code>public static void TakeScreenshot(IWebDriver driver, string saveLocation)
  {
      ITakesScreenshot ssdriver = driver as ITakesScreenshot;
      Screenshot screenshot = ssdriver.GetScreenshot();
      screenshot.SaveAsFile(saveLocation, ImageFormat.png);
  }
  </code></pre>