[英]Unable to scroll android native app with appium using java client 7.0
我無法使用Appium垂直滾動android應用。 我正在使用java-client 7.0.0 API。 Action.press
不起作用
(new TouchAction(driver))
.press({x: 600, y: 2408})
.moveTo({x: 348: y: 615})
.release()
.perform()
嘗試使用以下示例:
/**
* This method scrolls based upon the passed parameters
* @author Bill Hileman
* @param int startx - the starting x position
* @param int starty - the starting y position
* @param int endx - the ending x position
* @param int endy - the ending y position
*/
@SuppressWarnings("rawtypes")
public void scroll(int startx, int starty, int endx, int endy) {
TouchAction touchAction = new TouchAction(driver);
touchAction.longPress(PointOption.point(startx, starty))
.moveTo(PointOption.point(endx, endy))
.release()
.perform();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.