使用TouchAction触控滑动
发布时间
阅读量:
阅读量
appium-java-client-7.0.0,滑动需要注意的问题
依赖:
io.appium
java-client
7.0.0
Swipe操作不可行,请采用TouchAction来进行滑动操作。在开始操作之前,请先确定好模拟器的坐标系位置。通过实际测试和观察发现,在大多数情况下,默认设置为(0,0)作为屏幕左上方的起点;当向右移动时X轴数值递增;而向下移动时Y轴数值递增。

int width = driver windows getSize width; 获取窗口宽度
int height = driver windows getSize height; 获取窗口高度
PointOption pointOption= PointOption point width half height three quarters; 相当于坐标中心点
TouchAction touchAction = new TouchAction driver;
touchAction press pointOption moveTo PointOpt
全部评论 (0)
还没有任何评论哟~
