Enhance a script with Step box functions

There are a number of optional enhancements that can be added to scripts beyond the basic workflow. This task describes the enhancements and how to use them. For step details, see Steps box.

Modify steps

Modify step arguments and objects by selecting the desired step and expanding the options. This expands the step and allows you to modify the objects and properties. For a detailed list of the step structure, see Steps box.

  • Insert Flow Control Steps

    Loops repeat selected portions of the script until certain criteria is met or for a specified number of times. To insert a loop, click Step, select Flow Control and drag For loop to the desired location in the script. For details, see Insert and modify loops.

  • Insert If blocks or If-else blocks and exit steps

    To conditionalize a portion of the script, you can insert If or If-else blocks. To insert an If block, click Step, select Flow Control and drag If block to the desired location in the script. To add an else condition, click the Add else link next to the If step title. For more details, see TruClient step arguments.

    Exit steps cause a script to exit the iteration or the entire script. These can be used with If statements to exit a script or iteration when a specified condition occurs. To insert an exit step, click Step, select Flow Control and drag Exit to the desired location in the script.

Back to top

Insert comments

You can insert comments into your script by clicking Step, selecting Miscellaneous and dragging the Comment step to the desired location in the script.

Back to top

Catch error step

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

If there is 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.

To insert a Catch error step, click Step, select Flow Control and drag the Catch Error step to the desired location in the script.

The errors you can trap are:

  • Any.
  • Object identification. The object the action is performed on cannot be found.
  • Step arguments. One or more of the arguments to the preceding step 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.

To handle the error, enter or drag steps or functions into the group action box. Click the +/- icon to show the box.

For example:

Back to top

Verify that an object exists

To verify that a string or object exists in the application, you can insert a verify step:

  1. Click Step, select Functions and drag the Verify step to the desired location in the script.

  2. Click the object in the verify step.

  3. Select the object you want to verify.

Back to top

Insert generic steps

You can insert a generic or blank step and manually configure it. To insert a generic step do the following:

  1. Click Step, select Functions and drag the Generic Object/Browser Action step to the desired location in the script.
  2. Drag and drop the step to the desired location.
  3. Expand the step, and enter the desired step properties.

    Generic Object Actions perform an unspecified action on an object. Generic Browser Actions perform an unspecified action on the browser such as back, reload, and switch tabs.

Back to top

Add download filters

You can add URLs to VuGen > Runtime Settings > Download Filters to either include or exclude specific URLs while replaying your script.

Back to top

See also: