Waiting for Objects and Windows - WinRunner

You can create a synchronization point that instructs WinRunner to wait for a specified object or window to appear. For example, you can tell WinRunner to wait for a window to open before performing an operation within that window, or you may want WinRunner to wait for an object to appear in order to perform an operation on that object.

WinRunner waits no longer than the default timeout setting before executing the subsequent statement in a test script. You can set this default timeout setting in a test script by using the timeout_msec testing option with the setvar function. For more information, see “Setting Testing Options from a Test Script.” You can also set this default timeout setting globally using the Timeout for checkpoints and CS statements box in the Run > Settings category of the General Options dialog box.

You use the obj_exists function to create an object synchronization point, and you use the win_exists function to create a window synchronization point. These functions have the following syntax:

obj_exists ( object [, time ] );

win_exists ( window [, time] );

The object is the logical name of the object. The object may belong to any class. The window is the logical name of the window. The time is the amount of time (in seconds) that is added to the default timeout setting, yielding a new maximum wait time before the subsequent statement is executed.

You can use the Function Generator to insert this function into your test script or you can insert it manually.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics