Share this page

# Steps box

The Steps box tabs contains optional steps that you can drag and drop into your TruClient 2.0 - Web script.

For information on working with optional steps in your script, see Enhance script with Steps box functions.

Note: For details on the Run logic tab in the Steps box, see Run logic.

In this topic:

## Steps box Functions tab

The Functions tab includes the following function steps:

Step | Description
--- | ---
Verify | Verify that an object or string exists in the application. Select the object you want to verify. Value. The value of the property to verify. Property. The property to verify. Condition. The relationship between the value and property arguments.
Verify PDF content | Verify the content of a PDF document when running the script. Path. The file location. The location can be either a local file or a Web page address. Value. The PDF string to verify. The value can be either plain text or JavaScript code. Condition. Specify how to verify the value. Step Limitations You cannot search for content across a page break. You cannot search for a value that contains both special characters, such as Chinese characters, and alphanumeric characters.
Wait | Wait for a specified number of seconds (or milliseconds), before continuing with the next step. Duration. The time value that the step waits for, before the step passes (default = 3). Unit. The interval value. The unit properties available are Seconds (default setting) and Milliseconds. Think time. Set to true to include the wait time in the think time calculation (default setting).
Generic object action | A blank step that can be inserted and manually configured, to perform an unspecified action on an object.
Generic browser action | A blank step that can be inserted and manually configured, to perform an unspecified action on the browser such as back, reload, and switch tabs.
Take snapshot | Take a snapshot at that point during replay.
Call function | Call a custom function in the script. Enter values for arguments which are set by the called function (for example, Arg1, Arg2). For details, see Work with function libraries.
Wait for object | Wait for an object to load before continuing with the next step.

Back to top

## Steps box Flow control tab

The Flow control tab contains steps that enable you to build the logic of your script.

Loop statements

Loops repeat selected portions of the script until certain criteria is met, or for a specified number of iterations:

Step | Description
--- | ---
For loop | A logical structure that repeats the steps contained in the loop a specified number of times, until the end condition is met, or for a specified number of iterations, or until the code reaches a Break statement. Loop arguments use JavaScript syntax. Init. Specify the condition for the initialization operation, which must be met before testing the condition of the first iteration. Condition. Specify the condition for continuing to the next iteration. Increment. Increments a counter in the condition.
Continue | Indicates that the current loop iteration should end immediately. The loop condition is then checked to see if the entire loop should end as well. If the loop continues, the script continues with the next iteration. For example, if a Continue statement is encountered in the second of five iterations in a loop, the second iteration will end immediately and the third iteration will begin.
Break | Causes the loop to end immediately, without completing the current or remaining iterations. For example, if a Break statement is encountered in the second of five iterations in loop, the loop will end immediately.

If statements

To conditionalize a portion of the script, you can insert If type steps. These contain an If Block and an If Else block:

- If Block. If the condition is met, run the specified steps.

- Else Block. If the condition in the If Block is not met, the steps included in the Else Block section are run.

Step | Description
--- | ---
If block | A logical structure that runs the steps contained in the step If Block, as long as a defined condition expression is met. You can define any condition, as long as the result is a boolean value.
If verify | A combination of If block and Verify steps. 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.
If not exists | A logical structure that runs the steps contained in the block, if the selected object does not exist in the application.

Exit step

An Exit step exits the iteration or the entire script, depending on the specified setting.

This step can be used together with If statements, to exit a script or iteration when the specified condition occurs.

Catch error step

A Catch error step traps an error in the immediately preceding step, and runs the contents of the Catch error step. If the preceding step is a group step, Catch error traps errors from the entire group.

If you add more than one Catch error step, one after the other, they all apply to the step preceding the first Catch error step in the sequence.

The errors you can trap are:

- Any (default)
- Object Identification. The object the action is performed on cannot be found.
- Step Arguments. One or more of the arguments is invalid. For example, the data type is wrong.
- Step Action. The user action failed. For example, a navigation step did not find the page. For an action on a UI element, this error is triggered if the object was found and the action failed anyway.
- Step Timeout. The step timed out before reaching the End event.

To handle the error, enter or drag steps or functions into the Try and Catch blocks.

Back to top

## Steps box Miscellaneous tab

The Miscellaneous tab contains steps for inserting code, comments, and rendezvous points in your script.

Code steps

You can insert code into predefined steps as part of the step argument. In addition, you can use the following enhancement steps to add steps that are completely comprised of external code (C or JavaScript).

Step | Description
--- | ---
Evaluate JavaScript | Runs the JavaScript code contained in the step.
Evaluate JavaScript on object | Runs the JavaScript code contained in the step after the specified object is loaded in the application.
Evaluate C | Receives a C function and runs it. You can define functions in the C-functions.c file. Function Name. The name of the C function to run. Function Timeout. The amount of time to wait for the function to run (in seconds), before it returns an error. Note: We recommend avoiding Evaluate C, and using JavaScript instead wherever possible.

Additional steps

The Miscellaneous tab includes the following additional steps:

Step | Description
--- | ---
Comment | A blank step that enables you to insert comments in your script.
Rendezvous | Synchronize all Vusers in a Controller scenario to run a specified step at the same time. For example, you may want to test the impact of several users logging into your application at the same time. Define the Rendezvous name, which is the specific point where Vusers are synchronized in the step. Note: To insert a rendezvous step, drag it from the Steps box and place it above the step you want to synchronize.

Back to top

## Steps box Transactions tab

The steps on the Transactions tab enable you to control transactions:

For details, see Insert transactions in scripts.

Step | Description
--- | ---
Start transaction | Starts a new transaction at the insertion point.
End transaction | Ends the named transaction at the insertion point.

Back to top

## Steps box Favorites tab

The Favorites tab provides a quick way to add frequently-used steps to your scripts.

You can add a step in the Steps box to the favorites list by clicking the star icon in the step label. Once selected, the star is displayed as solid.

Click the star again to remove the step from favorites.

To view the Favorites tab, click the star tab icon.

Back to top

See also:

- Enhance script with Steps box functions
- Step structure
- Step properties

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1 All View Local Help Center View Online Help Center Version: