How to perform pinch out operation in android device using appium?
Posted on April 3, 2019
By Shibu Panda
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-200)).moveTo(PointOption.point(xOffset, yOffset-20));
AndroidTouchAction secondFnger= new AndroidTouchAction(driver);
secondFnger.press(PointOption.point(xOffset, yOffset+200)).moveTo(PointOption.point(xOffset, yOffset+20));
MultiTouchAction action2= new MultiTouchAction(driver);
action2.add(firstFinger).add(secondFnger).perform();
Thread.sleep(10000);