-1
我收到故障異常而採取的設備截圖如何在執行測試用例時保存android web驅動截圖?
我的代碼如下:
//open the page
driver.get("http://wikipedia.com");
//take another screenshot
try {
File screenshot = new File("screenshot1.png");
File tmpScreenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
}
catch(IOException e){
System.out.println("Failed to take screenshot."+e.getMessage());
}
//quit
driver.quit();
}
任何機構可以幫我這個問題?
謝謝它的工作 – user1928527