Performing multiple actions simultaneously in Appium

We can perform multiple actions using MultiTouchAction class in Appium. Below code shows how to add actions to MultiTouchAction class and then perform all actions at the same time.

In below example, we are moving the element e1 to e2 and at the same time moving the element e3 to e4 at the same time. Also note how we have used waitAction which is used to wait for specific period of time.

TouchAction action1 = new TouchAction(driver);

TouchAction action2 = new TouchAction(driver);

new MultiTouchAction(driver).add(action1).add(action2).perform();

You may also like...