title: How to take full page Screenshot of a scrollable webpage using Selenium WebDriver with Java?
body: <p>Existing code which takes screenshot of only visible screen. I am using the <code>Chromedriver</code>.</p>
  
  <pre><code>  System.setProperty("webdriver.chrome.driver", "D:/chromedriver/chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    driver.get("http://www.bbc.com");       
    driver.manage().window().maximize();
    System.out.println(driver.getTitle());
    File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
    FileUtils.copyFile(scrFile, new File("D:/chromedriver/scr3.png"));
    driver.close();
  </code></pre>