title: How to get screenshot of full webpage using Selenium and Java?
body: <p>How to take a screenshot of the entire web page (<em>full-page screenshot</em>), not only partial (<em>top-to-bottom</em>) using Selenium WebDriver?</p>
  
  <p><strong>My code:</strong> (<em>Java bindings</em>)</p>
  
  <pre><code>System.setProperty("webdriver.chrome.driver","/home/alex/Downloads/chromedriver_linux64/chromedriver");
  WebDriver driver = new ChromeDriver();
  driver.get("http://google.com");
  File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
  FileUtils.copyFile(scrFile, new File(RESULT_FILENAME));
  </code></pre>
  
  <p>Any ideas on how to tackle this?</p>