appium java页面滑动实现方式

 

List jokes = new ArrayList<>();
jokes=driver.findElements(By.name("Delivery Exception"));
AndroidElement firstJoke = jokes.get(0);
AndroidElement lastJoke = jokes.get(jokes.size()-3);
new TouchAction(driver).press(lastJoke).waitAction(Duration.ofSeconds(1)).moveTo(firstJoke).release().perform();

你可能感兴趣的:(appium java页面滑动实现方式)