How to perform multiple touch on any device? – pCloudy – Question and Answers
Home >> Appium Tricks and Tricks >> How to perform multiple touch on any ...

How to perform multiple touch on any device?


Code Snippet:

TouchAction fingerOne = new TouchAction(driver);
TouchAction fingerTwo = new TouchAction(driver);
MultiTouchAction action = new MultiTouchAction(driver);

fingerOne.press(20, 20);
fingerOne.moveTo(10, 100);
fingerOne.release();
                        
fingerTwo.press(30, 30);
fingerTwo.moveTo(20, 200);
fingerTwo.release();
                        
action.add(fingerOne);
action.add(fingerTwo);
action.perform();

Leave a Reply

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