Category:
Appium
public void verticalSwipeByPercentages(double startPercentage, double endPercentage, double anchorPercentage) {
Dimension size = driver.manage().window().getSize();
int anchor = (int) (size.width * anchorPercentage);
int startPoint = (int) (size.height * startPercentage);
int endPoint = (int) (size.height * endPercentage);
TouchAction touch = new TouchAction(driver);
touch.press(point(anchor, startPoint))
.waitAction(waitOptions(ofMillis(1000)))
.moveTo(point(anchor, endPoint))
.release().perform();
}