Synchronize script steps
Before enhancing a TruClient script, replay the script to synchronize the script steps.
TruClient scripts are asynchronous, which means that a step action does not always have to run to completion before the next step starts. Each step has an end event that defines the point at which subsequent steps are allowed to start running. After recording, the end events are not yet defined, and the End Event field for each step is set to Automatic: Not Yet Set.
During the first script replay on a particular browser, TruClient automatically identifies and assigns the relevant end event for each step. You can also manually set the end event to one of the predefined types. For details, see End event types.
Synchronize the script steps
Replay your script and manually change end events as needed to synchronize the script steps.
To synchronize the script steps:
Replay the script.
For each step, check that the assigned end event is correct. If needed, change it manually by selecting an option from the End Event dropdown menu. For details on the different options, see End event types.
Note: If you change an end event manually, the change is applied to all browsers, overwriting the automatic setting. If you have manually changed an end event and you need a different end event for each browser, use an If Browser step. For details, see Troubleshooting replay issues across browsers.
Save the script and replay it again to confirm the end events.
If the end event of a step is not reached within the defined Step Timeout time (in seconds), the step returns an end event timeout error. If this error occurs, you may need to manually assign a different end event to the step that returned the error.
You may need to replay the script several times until all steps have been accurately synchronized.
End event types
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
Note: This feature has been deprecated. It is supported in TruClient scripts recorded in older versions, but not for new scripts.
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.
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 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.
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.
Note: There is no distinct timeout for the object selected in the End Event field; the timeout is based on the Step Timeout value. For details, see Step Timeout.
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.