Thursday 6 August 2015

How to take the screen shots in seelnium2.0

// 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();

}
}

No comments:

Post a Comment