// store screenshots
public static void captureScreenShot(String filePath) {
File scrFile = ((TakesScreenshot)driver). getScreenshotAs (OutputType.FILE);
try {
FileUtils.copyFile(scrFile, new File(filePath));
} catch (IOException e) {
e.printStackTrace();
}
}
public static void captureScreenShot(String filePath) {
File scrFile = ((TakesScreenshot)driver). getScreenshotAs (OutputType.FILE);
try {
FileUtils.copyFile(scrFile, new File(filePath));
} catch (IOException e) {
e.printStackTrace();
}
}
No comments:
Post a Comment