Appium无法在iOS 8.4上滚动

Cha*_*man 5 java testing automation appium

我尝试使用以下代码在Appium上成功滚动:

// java
JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "down");
scrollObject.put("element", ((RemoteWebElement) element).getId());
js.executeScript("mobile: scroll", scrollObject);
Run Code Online (Sandbox Code Playgroud)

但是,由于已知的appium问题,在尝试滚动超出UITableView底部时出现javascript错误:https: //github.com/appium/appium/issues/4836

这个问题与appium的isDisplayed()方法一起总是返回true(无论单元格是否在屏幕上可见),而appium无法点击不可见的单元格,意味着appium无法滚动和选择对象.

有没有人找到解决这个问题的方法?

Cha*_*man 1

所以目前看来可能没有办法解决这个问题。Darshan 上面提到这个滚动问题在 iOS 8.4 中仍然存在,从网上冲浪似乎其他人也有同样的看法