Skip to main content
2 of 5
added 35 characters in body; edited tags; edited title
Ripon Al Wasim
  • 38k
  • 42
  • 159
  • 180

How to get screenshot of full webpage using Selenium with java?

How to make screenshot for full entire web page, not only partial from the top using Selenium WebDriver?

my Selenium WD java code is as below: 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)); 

any ideas?