Setting Wait State
Setting GUI Playback Options
Setting Wait State and Delay Options
In most cases, it is important for the playback of a GUI script to be synchronized
with the application-under-test so that Robot executes commands in the script only
after the application is ready to receive them. Robot attempts to maintain this
synchronization automatically for you, using several techniques.
You can refine the synchronization by setting the following options in the GUI
Playback Options dialog box:
Wait states for windows
Delays between commands
Delays between keystrokes
These options are described in the following sections.
Setting Wait State Options
During playback, Robot waits for windows (including dialog boxes) to appear
before executing a user action or verification point command. You can specify how
often Robot checks for the existence of a window and how long it waits before it
For example, suppose that Robot is playing back a script with the following lines:
Window SetContext, "Name=Form1",""
Pushbutton Click, "Name=Command5"
This example specifies that Robot should start an application, find a window on the
desktop named "Form1", find a pushbutton named "Command5", and generate a
click on that button. However, suppose Robot gets to the
line in the
script and fails to find a window named "Form1". This may not necessarily be an
error -- the application may not yet have started up and created the window. In this
case, Robot keeps looking for the window for a specified period of time.
NOTE: If a script needs to wait before executing a particular command, insert a
delay for that command only. (For information, see Inserting Delay Values on page
3-12.) If you are testing an application in which time estimates are not predictable,
you can define a wait state for a verification point so that playback waits based on
specific conditions rather than on absolute time. (For information, see Setting a
Wait State for a Verification Point on page 4-8.)