When I try to take screenshot of a page using selenium it is not capturing the entire page.
Code snippet:
File file = ((TakeScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(file,new File(location) ;
Note :Happening only sometimes when the page has a scrolling bar.