在testng中截取屏幕截图

时间:2017-05-10 14:43:09

标签: java testng

File source;    
source = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
String dest=System.getProperty("user.dir") + "/errorscreenshot/" + screenshotname + ".png";
File destination=new File(dest);
FileUtils.copyFile(source, destination);

0 个答案:

没有答案