2
是Appium能夠同時長按和截屏嗎?Appuim - 長按並同時截圖
public void press(By by) throws IOException {
WebElement el = driver.findElement(by);
TouchAction action = new TouchAction(driver);
action.longPress(el);}
後,我申請截屏
public void screenshot(String filename) throws IOException {
File srcFile=driver.getScreenshotAs(OutputType.FILE);
File targetFile=new File("./Screenshots/Navigation/" + generateCurrentDate()+ "/"+ filename +".jpg");
FileUtils.copyFile(srcFile,targetFile);}
但它執行長按,之後採取截圖。我同時需要基本的長按和截圖。
任何幫助表示讚賞
也許在這裏可以幫助:http://stackoverflow.com/questions/34201207/take-a-screenshot-during-dragging-in-appium – econoMichael