Use gesture operations

Gesture operations are finger movements that you perform on the touchscreen of your mobile device. With the Mobile Engine 3.0, you can use mobile-specific gesture operations to perform the following actions:

In some mobile applications, a swipe might unintentionally trigger a tap on a control. To avoid this situation, you can use the Draw on Screen Module and set the ModuleAttribute Long Tap to True.

Prerequisites

When you perform a gesture operation, ensure that you:

  • Have only one browser tab open.

  • Hide the Favorites bar from view in Safari on iOS.

Perform a gesture operation on a mobile control

The table below lists all gesture operations that you can perform on mobile controls.

Gesture operation

Description

{CLICK}

Tap on the current control.

{LONGCLICK}

Long tap which lasts 2 seconds.

{SWIPERIGHT}

Swipe right on the current control.

{SWIPELEFT}

Swipe left on the current control.

{SWIPEUP}

Swipe up on the current control.

{SWIPEDOWN}

Swipe down on the current control.

To perform a gesture operation on a control, follow the steps below:

  1. Specify the necessary test configuration parameters to establish a connection with the device.

  2. Add either the Open Mobile App TestStep or the OpenUrl TestStep as a first TestStep.

  3. Create a Module out of the control on which you want to perform a gesture operation.

  4. Drag and drop the Module onto your TestCase.

  5. Optionally, set the steering parameter ScrollingBehavior to None. This ensures that the controls you want to swipe remain in the same position on the screen.

  6. In the Value column, specify the gesture operation that you want to perform.

  7. Set the ActionMode to Input.

In the example below, you perform a long tap on a TextBox control.

{LONGCLICK} gesture operation on a control

Perform a swipe operation directly on the screen

You can perform a swipe directly on the touchscreen of your mobile device with the Module Swipe on Screen. This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Mobile.

The length of the swipe movement is equal to one third of the mobile screen size.

To perform a gesture operation directly on the screen, follow the steps below:

  1. Specify the necessary test configuration parameters to establish a connection with the device.

  2. Add either the Open Mobile App TestStep or the OpenUrl TestStep as a first TestStep.

  3. Drag and drop the Swipe on Screen Module onto your TestCase.

  4. From the drop-down in the Direction ModuleAttribute, select the direction of the swipe.

  5. Optionally, specify the behavior of the swipe:

  6. Set the ActionMode to Input.

If you provide the End Point coordinates, set the Direction ModuleAttribute to SWIPE.

In this example, you perform an upward swipe that lasts 1 second.

Swipe On Screen Module in a TestCase