Edit step properties in TruClient 2.0

This topic describes step properties that you can edit in the Step Editor.

About step properties

TruClient records your actions exactly as you performed them. However, when testing you may want the test to run differently than you recorded it. For example, you may want to run some steps only if a condition is true, or to vary the data you enter in the application.

You can edit many of the properties for both recorded steps and manually added steps using the Step Editor.

To open the Step Editor, expand a step in the Actions view and click More. The properties in the Step Editor are divided into three categories:

Category Description For details, see:
Step Properties defining how to run the step, including end event and timeouts. Step category
Arguments

Properties controlling how an action is carried out.

TruClient step arguments
Object Properties to identify the test object for the step. Object category

Note:  

  • Explanation of the icons and buttons used for the properties are available here: Step options

  • The actual categories and category properties for a step vary, depending on the step type and actions.

Back to top

Step category

The following table provides information for some of the Step category properties:

UI Element Description
Action

The action that defines the step. The list of relevant actions is determined by the object roles.

Step timeout

If the End event is not reached by this time in seconds, the step returns an error. The default value is defined in the runtime settings.

Object timeout

If the object does not appear before this time in seconds, the step returns an error. The default value is defined in the runtime settings.

End event

TruClient defines when the End event occurs during the first script replay on each supported browser. You can use the end event automatically identified by TruClient, or you can assign a different end event to the step.

End event values can be one of the following:

  • Not yet set. The automatic end event has not yet been determined.

  • Action completed. Step ends when its action is completed. An example of an action is a button click.

  • DOM content loaded. Step ends when the page's Document Object Model (DOM) is ready. This means that the API for interacting with the content, style, and structure of a page is ready to receive requests from your application's client side code.

  • Document loaded. Step ends when the process of loading a document is completed. This means that all scripts and stylesheets have finished loading and have been executed, and all images have been downloaded and displayed.

  • Step network completed. Step ends when all HTTP requests have completed including requests initiated by XMLHttpRequest.

For details on working with end events, see End events in TruClient 2.0 scripts.

Minimum time

The least time, in seconds, that the execution of the step will take. The value of this field can be either 0, “as recorded” or another manually set number.

If the minimum time is set to 0, the step execution will end immediately after the step's end event.

A minimum time value greater than 0 forces TruClient to wait the additional time (if not elapsed already) from the step's end event before moving on to the next step.

TruClient records and stores the time that elapsed between the recorded actions and allows you to set the minimum time to “as recorded”.

Use recorded duration

When set to true, the minimum runtime for the step is the duration it took during recording. When set to false, the recording duration is ignore. The default value is defined in the runtime settings.

Note: Once you manually edit the script, the test run may no longer reflect the same duration as during recording.

Back to top

Object category

The following table provides information for some of the Object category properties:

Action How to
Name The Name box displays a logical name for the object. This does not affect replay and can be modified to enhance readability.
ID method The ID Method box displays the object identification method used for the object:
  • TruClient identification. Default method. Allows TruClient to use its internal advanced algorithms to identify the object.

  • JavaScript. JavaScript code that returns an object. When you select this option, the JavaScript edit box is displayed, enabling you to write JavaScript to define the object. For details, see Modify the object identification method.
  • Cascading style sheets (CSS). Use CSS selectors to identify the object. When you select this option, the Cascading style sheets edit box is displayed, enabling you to use CSS to define the object. For details, see Modify the object identification method.
  • XPath. Identifies the object based on the XPath expression that defines the object in the DOM tree. When you select this option, the XPath edit box is displayed, enabling you to select an XPath to define the object. For details, see Modify the object identification method.

  • Descriptors. Enable you to identify an object by its properties in an editor. For details, see Descriptors for TruClient 2.0 scripts.
<Selected ID method>

After changing the object identification method in the ID method field to anything other than TruClient identification, a field is added to provide details. Click the Edit button to open the relevant Object identification editor.

Back to top

Next steps: