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:

Prerequisites

When you perform a gesture operation, ensure that you:

Perform a gesture operation on a mobile control

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

Gesture operation

Description

{CLICK}

Performs a tap on the current control.

{LONGCLICK}

Performs a long tap which lasts 2 seconds.

{SWIPERIGHT}

Performs a swipe to the right on the current control.

{SWIPELEFT}

Performs a swipe to the left on the current control.

{SWIPEUP}

Performs a swipe to the top on the current control.

{SWIPEDOWN}

Performs a swipe to the bottom on the current control.

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

  1. Specify the 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 in the execution.

  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 to ensure the controls you want to swipe remain in the same position on the screen.

  6. In the Value column, specify the name of the gesture you want to perform.

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 via the Swipe on Screen Module. The length of the swipe movement is equal to one third of the mobile screen size.

Use the Module Swipe on Screen to specify the swipe operation.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Mobile.

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

  1. Specify the 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 in the execution.

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

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

  2. Optionally, specify the behavior of the swipe:

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