Tap - operation

  • Android mobile

This operation simulates tapping on a specific element or position on the device screen.


There are 3 types of tap available in Suitest:

  • Single tap - Regular tap on the screen
  • Double tap - Double tapping on the screen within a very quick time period
  • Long tap - Touching the screen and holding a finger there for a while

Tapping can be performed on:

  • an element - on the center of its bounding box (if the element is obscured by other elements or not completely visible the operation may not work as expected)

  • a position - on specified coordinates defined in pixels relative to the top left corner of the app

Single tap on the target

Single tap gesture

To perform this operation in the Suitest Test editor use the Tap line with single type:

Single tap in the Test editor

To perform this operation in the Suitest JavaScript API use the Tap command in conjunction with the chosen subject:

await suitest.element('logoImg').tap('single');
await suitest.position(100, 200).tap('single');

Double tap on the target

Double tap gesture

You can send double tap action to tap on the target twice in a very short time. You can do so either on an element or on a position.

In Test Editor:

Double tap in the Test editor

In JavaScript API, you can use one of the following two examples based on the target:

await suitest.element('logoImg').tap('double');
await suitest.position(100, 200).tap('double');

Long tap on the target

Long tap gesture

You can execute the long tap (sometimes known as long press) action to simulate pressing of the screen for a longer period of time. You can do so either on an element or on specific position:

In Test Editor:

Long tap in the Test editor

In JavaScript API, you can use one of the following two examples based on the target:

await suitest.element('logoImg').tap('long');
await suitest.position(100, 200).tap('long');