This blog is for Automation Test Engineers

Sunday, 3 September 2017

How to takes screenshot

WebDriver driver=new FirefoxDriver();
driver.get("https://www.google.co.in/");
File scrfile=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrfile,new File("E://test.png"));
driver.close();




}
0

0 comments:

Post a Comment