How to perform pinch in operation in android device using appium?
Posted on April 3, 2019
By Anshuman Chatterjee
Code Snippet:
//Java-Client version: Latest(7.0.0)
//Appium version: 1.9.1
AndroidTouchAction firstFinger= new AndroidTouchAction(driver);
firstFinger.press(PointOption.point(xOffset, yOffset-20)).moveTo(PointOption.point(xOffset, yOffset-200));
AndroidTouchAction secondFnger= new AndroidTouchAction(driver);
secondFnger.press(PointOption.point(xOffset, yOffset+20)).moveTo(PointOption.point(xOffset, yOffset+200));
MultiTouchAction action= new MultiTouchAction(driver);
action.add(firstFinger).add(secondFnger).perform();
Thread.sleep(10000);