File srcFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); { FileUtils.copyFile(srcFile, File()); } (IOException e) { e.printStackTrace(); }