Step Editor

To open the Step Editor, click the open/close icon.

The sections and data you can edit depend on the type of step.

Menu bar interface elements

UI Element Description
Drag Step. Arrange the order of your script by dragging the step to a different location.
Expand Step. Displays the individual components of a step which includes step, argument and object.

Script levels selector. View and modify the script level of a step. For more information, see Modify and view script and step levels.
Replay. Replay this step only.
Disable/Enable Step. Temporarily remove steps from the script without deleting them. Steps that are disabled are not replayed.
Optional Step. In the event that the step can not find its object, the script continues without returning an error.
Alternative Steps. This icon indicates a step which can be redefined in alternative ways. To redefine the step, click the icon, select the desired step definition, and click Back. For more information, see Use alternative steps.

Back to top

Step section user interface elements

UI Element Description
Action

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

Object Timeout

If the object does not appear before this time in seconds, the step returns an error.

Step Timeout

If the End Event is not reached by this time in seconds, the step returns an error. The way the script behaves when such an error occurs can be configured in the TruClient General Settings dialog box.

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.

The step execution will end immediately after the step’s end event if minimum time is = 0.

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 recorded actions and allows you to set the minimum time to “as recorded”.

End Event

TruClient defines when the End Event occurs during the first script replay on each supported browser.

An End Event can be one of the following:

  • Automatic: Not Yet Set. The automatic end event has not yet been determined.
  • Automatic: Timers Ended. The automatic end event whenever TruClient identifies either the setTimeout() or the setInterval() function running as part of the document load in the JavaScript code.
  • 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 client side code.
  • Step synchronous network completed. Step ends when all HTTP requests have been completed excluding requests that are associated with open connections that are not relevant to the step. Usually, these requests are triggered by using XMLHttpRequest.

  • Document load. 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.
  • Object Exists. Step ends when the end event object is visible on the screen.

    For TruClient Web and TruClient Mobile Web scripts, this end event must be selected manually in the step.

    For TruClient Native Mobile scripts, this end event is automatically identified during the first replay. For more information, see Enhance scripts in the Mobile Center Help.

  • Step network completed. Step ends when all HTTP requests have completed including requests initiated by XMLHttpRequest.
  • Dialog opened. Step ends when a dialog box is opened.

For details, see Synchronize Script Steps

Back to top

Arguments section

Step arguments are different for different step actions and roles.

Where applicable, you can use the argument dropdown to choose how the value of the argument is evaluated. Common options are:

  • plain values (using the plain text editor ). These are primitive types: text, number, Boolean and so on.
  • JavaScript expression to be evaluated (using the JavaScript editor )
  • the name of a parameter (using the parameter editor ). The current value of the parameter is used. See Use Parameters to Vary Arguments.

For a list of the step arguments, see TruClient Step Arguments.

Back to top

Object section user interface elements

UI Element Description
Highlight. Checks if an object is visible in the application at any time.

For details, see Highlighting an object.

Replace. Replaces the current object with a different object without replacing the step. For details, see Replace an object.

Roles The functions that TruClient understands about an object. This information is read-only and is updated dynamically depending on how the object is used during recording. The list of available step actions is defined by these roles.
Name A logical name for the object. This does not affect replay and can be modified to enhance readability.
ID Method The method of identifying the object.
  • Automatic. TruClient's default object identification method. If this method does not successfully find the object during replay, click the Improve Object Identification button, reselect the correct object from the application, and replay the script again.
  • XPath. Identifies the object based on its XPath expression that defines the object in the DOM tree. When you select this option, the next edit box in the display is labeled XPath and enables you to select an XPath to define the object. See XPath and JavaScript Object ID Method for details.
  • JavaScript. JavaScript code that returns an object. When you select this option, the next edit box in the display is labeled JavaScript and enables you to write JavaScript to define the object. For details, see XPath and JavaScript Object ID Method or Working With JavaScript In TruClient Scripts.
  • Descriptors. Enable you to identify an object by its properties in an editor. For details, see Descriptors.
Related Objects Tool to enable TruClient to identify a target object in relation to an anchor object. For details, see Object Identification.

XPath and JavaScript Object ID Method

TruClient generates two possible XPaths, one based upon the object's property and the other based upon the object's DOM structure. Click the arrow next to the XPath edit box to select a suggested XPath for the object. You can manually modify the suggested XPath. To revert to one of the original expressions generated by TruClient, select one of the options from the dropdown again.

You can also click the Regenerate expression button and select an object. TruClient generates a new set of suggestions based on the selected object.

If TruClient can generate a suggested XPath for the object, that XPath is entered as the argument in an evalXPath function in the JavaScipt field. The evalXPath function returns an array of the objects defined by the XPath in the argument.

You can modify the suggested XPath in the argument to return a different list of objects, or you can enter a different JavaScript. For example: document.getElementById("SearchButton") returns an element that has a DOM ID attribute of "SearchButton".

There is also a TruClient random function that returns a random item from an array. For example: random(document.getElementsByTagName("myArray"))

Note: The evalXPath and random functions are available as object identification methods only. They are not recognized in an Evaluate JavaScript code step.

Back to top

Transactions section

Allows you to create, modify, and view transactions. For more information, see Insert Transactions.

Back to top

See also: