简体   繁体   中英

How to swipe in Mobile using coordinates ? i am using appium ,java

Below code, I used but didn't work

try{
     driverNew.findElementByAndroidUIAutomator("new UiScrollable(new
     UiSelector().scrollable(true)"+".scrollToEnd(4);");
     } catch (Exception e) {
     System.out.println(e.getMessage());
     }

Finally got working code

Using Appium I found coordinated to swipe

TouchAction swipe = new TouchAction(driverNew).press(PointOption.point(540, 1824)).waitAction(waitOptions(ofMillis(800))).moveTo(PointOption.point(540, 672)).release().perform();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM