最近升级到了Xcode 8,Appium 1.6 正式版,切换到 WebDriverAgent 进行iOS APP的自动化测试,发现以前用的swipe 不好用了:
TouchAction mySwipe1= new TouchAction(driver)
.press(260, 478)
.waitAction(2000)
.moveTo(100, 478)
.release();
mySwipe1.perform();//左划
TouchAction mySwipe2= new TouchAction(driver)
.press(100, 478)
.waitAction(2000)
.moveTo(260, 478)
.release();
mySwipe2.perform();//右划
TouchAction mySwipe3= new TouchAction(driver)
.press(100, 100)
.waitAction(2000)
.moveTo(100, 478)
.release();
mySwipe3.perform();//下滑
TouchAction mySwipe4= new TouchAction(driver)
.press(100, 478)
.waitAction(2000)
.moveTo(100, 100)
.release();
mySwipe4.perform();//上滑
除了下滑的运行效果达到了期望,其他三个方向的滑动执行后都只能看到目标区域整体下滑了一点点,请问是怎么回事啊?有什么其他方法能实现滑动么?