Appium滑动

来源:互联网 发布:网络店铺运营 编辑:程序博客网 时间:2024/06/08 07:45
TouchAction touchAction = new TouchAction(this);
// appium converts press-wait-moveto-release to a swipe action
touchAction.press(startx, starty).waitAction(duration)
.moveTo(endx, endy).release();
touchAction.perform();
提示:swipe 的高级用法,swipe 可以进一步封装,比如一些MobileElement需要滑动屏幕
才能出现,这个时候就可以封装一个滚动到这些MoblieElement出现为止的方法。
0 0
原创粉丝点击