Modifying a step in a test from the SmartShot View

You can modify the step targets in a test from the SmartShot View pane of HCL DevOps Test UI (Test UI). Two options are available from the menu items. One is used to modify an action in a test script and assign a new object as target of the action. The other option is used to define execution variables for the selected object and give a new value to the property associated with the object.

Before you begin

You must have created a test from a recording and have the test script open in the test editor. In the Test Contents area you must have selected the action item for which you want to modify the step.
Note: When you run a test from the mobile client on mobile devices, it uses the same values that you used during recording. If you modify the test script and create a dataset or variable, or if you add a condition, a loop, custom code, references or add other statements, they are not taken into account by the mobile client at run time. To verify that the initial recorded values are substituted with variable data, you must initiate the test run from Test UI.

About this task

You can modify a step target in a test by either assigning an object as the step target or by creating a variable assignment from a propertyName.

Procedure

To assign a new object as step target:
  1. In the SmartShot view, select a graphical object or the corresponding element in the hierarchical list Elements, and then right-click and select Use this element as step target.
    In the test editor, the current step target is replaced by the selected graphical object.
  2. In the Test Element Details section, you can change the action or location initially specified to fit the new target.
To assign a variable and set a new value for the objects property:
  1. Select an object in the SmartShot or Elements view, and then right-click and select Create variable assignment from propertyName.
  2. In the dialog, search for a variable that was created in your test. To do so, enter a name to filter the list of available variables and click the one matching the name. Click OK.
  3. Save the test.