background image
<< the function returns TIMEOUT | using regular expressions >>
<< the function returns TIMEOUT | using regular expressions >>

Waiting for Text to Appear on the Screen

Creating Vuser Scripts
Chapter 16, page 296
RTE Vuser Scripts · Synchronizing RTE Vuser Scripts
In
Waiting for Text to Appear on the Screen
You can use text synchronization to synchronize an RTE Vuser script running on a
VT terminal emulator. Text synchronization uses the TE_wait_text function. During
script execution, the TE_wait_text function suspends script execution and waits for
a specific string to appear in the terminal window before continuing with script
execution. Text synchronization is useful with those applications in which the cursor
does not consistently appear in a predefined area on the screen.
Note: Although text synchronization is designed to be used with character mode
(VT) terminals, it can also be used with IBM block-mode terminals. Do not use
automatic text synchronization with block-mode terminals.
The syntax of the TE_wait_text function is:
int TE_wait_text ( char *
pattern
, int
timeout
, int
col1
, int
row1
, int
col2
, int
row2
,
int *
retcol
, int *
retrow
, char *
match
);
This function waits for text matching
pattern
to appear within the rectangle defined
by
col1, row1, col2, row2
. Text matching the pattern is returned to
match
, and the
actual row and column position is returned to
retcol
and
retrow
. If the
pattern
does
not appear before the
timeout
expires, the function returns an error code. The
pattern
can include a regular expression. Refer to the
LoadRunner Online
Online
Function
Reference