【发布时间】:2016-08-19 07:56:55
【问题描述】:
Appium 可以同时长按和截屏吗?
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);}
但它会执行长按,然后截取屏幕截图。我基本上需要同时长按和截图。
任何帮助表示赞赏
【问题讨论】:
-
也许这里的东西可以帮助:stackoverflow.com/questions/34201207/…
标签: java android selenium appium