Adding user actions in a test

You can add user actions in a test script from the test editor for Android, iOS, or Web UI applications. User actions are actions such as click, swipe, tap, and touch on mobile devices. These actions help you navigate around the application. After you record a script, you might decide to add new user actions in the script such as swiping right with one touch on a view.

Before you begin

Create a test from a recording and open the test script in the test editor.

About this task

You can create user actions in the tests which are created from Android, iOS, hybrid or Web UI applications. The graphic object and the object's action are different for iOS, Android and Web UI applications.

Procedure

  1. In the Rational® Test Workbench Mobile Test Edition, open the test script; and in the Test Contents area, select a test script line.
  2. Click the insert push button and select Add user action for Android, iOS or WebUI, depending on the target application. Another way is to right-click the selection, or to click Options > insert and in the test editor to select the menu item.
  3. In the Test Element Details section select a value for the artifacts identified as required for the action selected. To create a user action, you must specify an object and an action. The content of the Graphic object field is not the same for Android and iOS apps. The choices available in the object’s action list are dependent upon the object selected. Other artifacts are optional. The values available in the mandatory fields are different for Web UI apps and Android or iOS apps. Example for a test created from an Android application under test: Select View in the list of graphic object and Swipe in the list of Object's action, and select Right for Direction, and enter 1 in Number of touches required.
  4. A user action is added to the test script just before the node selected. Save the test.

Feedback