default void swipeLeftToRight(AppiumDriver<MobileElement> driver) {
Dimension size = driver.manage().window().getSize();
int endx = (int) (size.width * 0.8);
int endy = (int) (size.width * 0.8);
int startx = (int) (size.width * 0.20);
int starty = size.height / 2;
TouchAction<AndroidTouchAction> ts = new AndroidTouchAction(driver);
ts.press(PointOption.point(startx, starty))
.waitAction(WaitOptions.waitOptions(Duration.ofSeconds(1)))
.moveTo(PointOption.point(endx,endy))
.release()
.perform();
}
- 使用iPad Pro(11英寸)
- 我正在使用java语言编写测试用例。
文章源自玩技e族-https://www.playezu.com/179128.html