Appium ios 如何滑动iOS模拟器屏幕

Appium ios 如何滑动iOS模拟器屏幕,appium-ios,Appium Ios,当我升级本地版本的Appium时,我所有的刷卡逻辑都停止了工作。我转向了非弃用API,但我仍然无法观察到滑动。我很确定我只是没有正确使用坐标系,但我不确定如何使用。我想垂直滑动iOS模拟器的屏幕以刷新列表视图 有没有关于如何正确对待刷卡、为什么刷卡以及刷卡的机理的建议 这是我的刷卡代码 PointOption fromPoint = PointOption.point( topView.getLocation().x, topView.getLocation().y); Poi

当我升级本地版本的Appium时,我所有的刷卡逻辑都停止了工作。我转向了非弃用API,但我仍然无法观察到滑动。我很确定我只是没有正确使用坐标系,但我不确定如何使用。我想垂直滑动iOS模拟器的屏幕以刷新列表视图

有没有关于如何正确对待刷卡、为什么刷卡以及刷卡的机理的建议

这是我的刷卡代码

PointOption fromPoint = PointOption.point(
    topView.getLocation().x,
    topView.getLocation().y);

PointOption toPoint = PointOption.point(
    bottomView.getLocation().x,
    bottomView.getLocation().y);

new TouchAction(user.mDriver)
           .press(fromPoint) 
           .moveTo(toPoint)
           .release()
           .perform();

我升级了Appium版本和Java客户端,但这些改进并没有解决刷卡问题

显然,必须添加刷卡的等待时间

WaitOptions waitOptions = WaitOptions.waitOptions(Duration.ofMillis(500));

new TouchAction(mUser.mDriver)
        .press(fromPoint)
        .waitAction(waitOptions)
        .moveTo(toPoint)
        .release()
        .perform();

这是我的代码,它在IOS模拟器上运行良好

JavascriptExecutor js = (JavascriptExecutor) driver;    
HashMap<String, String> scrollObject = new HashMap<String, String>();    
scrollObject.put("direction", "left");    
js.executeScript("mobile: swipe", scrollObject);    
JavascriptExecutor js=(JavascriptExecutor)驱动程序;
HashMap scrollObject=新建HashMap();
滚动对象。放置(“方向”,“左”);
js.executeScript(“移动:滑动”,scrollObject);