Я пытаюсь использовать Touchaction путем определения начальной и конечной точек, но, похоже, это не работает. Есть предложения?
public static void swipeVertical(AppiumDriver driver, double startPercentage, double finalPercentage, double anchorPercentage, int duration) throws Exception {
Dimension size = driver.manage().window().getSize();
int anchor = (int) (size.width * anchorPercentage);
int startPoint = (int) (size.height * startPercentage);
int endPoint = (int) (size.height * finalPercentage);
new TouchAction(driver).press(anchor, startPoint).waitAction(duration).moveTo(anchor, endPoint).release().perform();
//In documentation they mention moveTo coordinates are relative to initial ones, but thats not happening. When it does we need to use the function below
//new TouchAction(driver).press(anchor, startPoint).waitAction(duration).moveTo(0,endPoint-startPoint).release().perform();
}
swipeVertical(driver,0.9,0.1,0.5,3000);