繁体   English   中英

使用TouchAction的Appium精确滚动

[英]Appium precise scroll using TouchAction

Appium 1.5.3,macOS Sierra,Android 5,Java

我想向下滚动列表视图一定数量的像素(-400)。 我正在使用此代码:

TouchAction touchAction4 = new TouchAction(driver);
touchAction4.press(400, 800).moveTo(0,-400).waitAction(2000).release();
touchAction4.perform();

但是,它的工作原理就像用手指快速滚动约几个屏幕高度一样。 waitAction没有帮助。

我更喜欢使用驱动程序的滑动方法。

driver.swipe(startX, startY, endX, endY, durationMilis)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM