TruClient Steps box for native mobile

This topic explains how to add steps to a script from the Steps box (or Toolbox in TruClient versions earlier than 2020).

Add steps to a script

The Steps box contains all of the steps that you can add to a script.

  1. Click the Step button in the TruClient toolbar to open and close the Steps box.

  2. Select a step from one of the following tabs and drag it to the desired location in the script.

    UI Element
    Description
    Functions
    • Verify. Verify that an object exists in the application.

    • Wait. Wait for a specified number of seconds (or milliseconds), before continuing with the next step.

    • Wait for Object. Wait for an object to load before continuing with the next step.

    • Generic Device Action. Mobile device related action steps that can be inserted and manually configured.

    • Generic Object, Browser, and API Actions. Blank steps that can be inserted and manually configured.

    • Activate WebView. A step that activates the current WebView. When running individual steps or if you want to highlight a Web object, you must first run the Activate WebView step. During recording, each time the TruClient records a WebView component, it generates an Activate WebView step.

    • Call Function. Insert a custom function in the script. For details, see TruClient Functions and Function Libraries.
    Application
    • Using Application. Notifies the UFT Mobile server which application is currently being used. This is necessary, since your script can use multiple applications. Using Application steps are generated automatically, but if you make manual changes or work on a different application than the active one, you will need to add this step.

    • Launch Application. Launches the selected app. If you installed an app through the UFT Mobile wizard, you can instruct your script to reinstall it on the device by selecting the install option in the Arguments section.

    Flow Control
    • For Loop. A logical structure that repeats the steps contained in the loop a specified number of times.

    • If Block. A logical structure that runs the steps contained in the block if the condition is met.
    • If Verify. A combination of “If Block” and “Verify”, a logical structure that runs the steps contained in the block if the condition on a property of the selected object is met.
    • If Exists. A logical structure that runs the steps contained in the block if the selected object exists in the application.
    • Break. Causes the loop to end immediately without completing the current or remaining iterations.

    • Continue. Causes the current loop iteration to end immediately. The script continues with the next iteration.

    • Catch Error. Catches an error in the step immediately preceding and runs the contents of the catch error step. For more information, see Catch error step.

    • Exit. Exits the iteration or the entire script depending on the specified setting.

    Miscellaneous
    • Evaluate JavaScript. Runs the JavaScript code contained in the step.

    • Comment. A blank step which allows you to write comments in your script.

Note: The Step button is not available in the UFT Mobile tab in a TruClient - Native Mobile script.

Back to top

Add steps to favorites

You can create a list of your favorite steps. This provides a quick way to add frequently used steps to your scripts.

For more details, see Steps box in the TruClient Help Center.

Back to top

See also: