In Appium, the advanced user interactions API allows you to perform complex mobile gestures, such as drag and drop, swipe, and zoom by using the TouchAction
and MultiTouchAction
classes. It simply builds a complex chain of events, similar to what users do manually on their mobile devices. In the upcoming sections, we will see these classes in detail.
Long press is a mobile gesture that is widely used by people. It is a wonderful feature; most people say that you should touch and hold instead of using long press. By using long press, you can get more information about a particular feature. Just like a context-click on the Web, it also enables multiselection in mobile apps.
Let's try and create a long press example using the TouchAction
class. Here, we are going to take an example of a dialer pad on an Android real device. In this section, we will long press the number 0 and it will be converted into +. To do this, we need to perform the following...