Synchronize steps on terminal emulators

Insert a synchronization step while recording

  1. Select Design > Emulator Synchronization.

  2. (Optional) Specify a timeout in milliseconds for the Sync statement, after which the run session continues regardless of the status of the emulator. If you do not specify a timeout value, UFT One uses the default timeout interval, as described in Set synchronization timeout.


    • You can adjust your emulator configuration to prevent UFT One from automatically inserting Sync steps for TeScreen objects in your test or business component.

    • You can specify the keys that generate Sync steps for TeTextScreen objects.

    For details, see Manage terminal emulator configuration settings

Back to top

Set synchronization timeout

In the Run Pane (Test Settings Dialog Box) (File > Settings > Run node), set the Object Synchronization Timeout.

This enables you to specify the maximum interval (in milliseconds) that UFT One waits before running each test step.


  • This option is not available for business components.

  • This setting is also used as the default timeout for the Sync and WaitString methods for both the TeScreen and the TeTextScreen objects if a timeout argument is not specified.

Insert a synchronization point for an object

Select Design > Synchronization Point.

When you insert a synchronization point into your test or business component, UFT One generates a WaitProperty statement in the Editor. This statement instructs UFT One to pause the test or business component until a particular object property achieves the value you specify.

If you want the run session to wait until the Text property of the Result field has a value of Successful, insert the following statement:

TeScreen("LogOn").TeField("Result").WaitProperty "Text", "Successful"

Back to top

Wait for a specified text string

UFT One's WaitString method delays the run session until a specific text string appears in a specified rectangle on the terminal emulator screen. The specified text string can be a constant string or a regular expression.

  1. Select Design > Emulator WaitString. Your cursor becomes a crosshairs pointer.

  2. Drag the pointer to draw a rectangle on your emulator screen containing the text string for which you want the run session to wait. UFT One inserts a step into your test or business component with the following syntax:

    TeScreen(description).WaitString    String [,    TopRow,    LeftColumn,    BottomRow,    RightColumn,    Timeout,    RegExp]
    TeTextScreen(description).WaitString    String, [TopRow,    LeftColumn,    BottomRow,    RightColumn,    Timeout,    RegExp]

    The position on the screen is defined by the values of the four corners of the rectangle, each corner with its own argument.

  3. Optionally, you can:

    • Specify that the value specified in the String argument is a regular expression by setting the value of the RegExp argument to True. Regular expressions enable UFT One to identify objects and text strings with varying values.

    • Add a timeout value in milliseconds after which the run session continues regardless of whether the text string appears on the screen. If you do not specify this value, UFT One uses the default timeout interval.

Back to top