How to perform pinch in operation in android device using appium? – pCloudy – Question and Answers
Home >> Appium Tricks and Tricks >> How to perform pinch in operation in ...

How to perform pinch in operation in android device using appium?


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

Leave a Reply

Your email address will not be published. Required fields are marked *