background image
<< Synchronizing Character-Mode (VT) Terminals | the function returns TIMEOUT >>
<< Synchronizing Character-Mode (VT) Terminals | the function returns TIMEOUT >>

Waiting for the Cursor to Appear at a Specific Location

Creating Vuser Scripts
Chapter 16, page 294
RTE Vuser Scripts · Synchronizing RTE Vuser Scripts
In
Waiting for the Cursor to Appear at a Specific Location
The preferred method of synchronization for VT type terminals is cursor
synchronization. Cursor synchronization is particularly useful with full-screen or
form-type applications:, as opposed to scrolling or TTY-type applications.
Cursor synchronization uses the TE_wait_cursor function. When you run an RTE
Vuser script, the TE_wait_cursor function instructs a Vuser to suspend script
execution until the cursor appears at a specified location on the screen. The
appearance of the cursor at the specified location means that the application is
ready to accept the next input from the terminal emulator.
The syntax of the TE_wait_cursor function is:
int TE_wait_cursor ( int
col
, int
row
, int
stable
, int
timeout
);
During script execution, the TE_wait_cursor function waits for the cursor to reach
the location specified by
col
,
row
.
The
stable
parameter specifies the time (in milliseconds) that the cursor must
remain at the specified location. If you record a script using VuGen,
stable
is set to
100 milliseconds by default. If the client application does not become stable in the
time specified by the
timeout
parameter, the function returns TIMEOUT. If you
record a script using the Vuser Script Generator,
timeout
is set by default to the
value of TIMEOUT, which is 90 seconds. You can change the value of both the
stable
and
timeout
parameters by directly editing the recorded script.