Created
August 20, 2020 09:38
-
-
Save angelovstanton/ca23ff28ac5a236393b0929a23c45c7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void takeFullScreenshot(String fileName) throws Exception { | |
File srcFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); | |
String tempDir = getProperty("java.io.tmpdir"); | |
File destFile = new File(Paths.get(tempDir, fileName + ".png").toString()); | |
FileUtils.getFileUtils().copyFile(srcFile, destFile); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment