FirefoxDriver driver = new FirefoxDriver();
....
File pngFile = new File("D:\\test\\", "shot.png");
File tmpFile = driver.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(tmpFile, pngFile);
Friday, July 16, 2010
Take screen shot on WebDriver
Simple code on take screen shot on WebDriver(InternetExplorerDriver,FirefoxDriver and ChromeDriver):
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment