background image
<< About Reading Text from the Terminal Screen | Reading Text from the Screen >>
<< About Reading Text from the Terminal Screen | Reading Text from the Screen >>

Searching for Text on the Screen

Creating Vuser Scripts
Chapter 17, page 304
RTE Vuser Scripts · Reading Text from the Terminal Screen
In
Searching for Text on the Screen
The TE_find_text function searches for a line of text on the screen. The syntax of
the function is:
int TE_find_text ( char
*pattern
, int
col1
, int
row1
, int
col2
, int
row2
,
int
*retcol
, int
*retrow
, char
*match
);
This function searches for text matching
pattern
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
. The search begins
in the top-left corner. If more than one string matches
pattern,
the one closest to
the top-left corner is returned.
The
pattern
can include a regular expression. Refer to the
LoadRunner Online
Function Reference
for details on using regular expressions.
You must manually type TE_find_text statements into your Vuser scripts. For
details on the syntax of the TE_find_text function, refer to the
LoadRunner Online
Function Reference
(available from the VuGen Help menu).
Online
Function
Reference