Search code examples
javaappiumswipe

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());
     }

Solution

  • 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();