|
KabInfo.Net
 
1)
Explain Get Text checkpoint web text checkpoint with syntax?
a)
We use web_obj_text_exists
function for web text checkpoints.
web_obj_text_exists
( object, table_row, table_column, text_to_find [, text_before, text_after] );
a.
object
The logical name of the object to search.
b.
table_row
If the object is a table, it specifies the location of the row within a table.
The string is preceded by the character #.
c.
table_column
If the object is a table, it specifies the location of the column within a
table. The string is preceded by the character #.
d.
text_to_find
The string that is searched for.
e.
text_before
Defines the start of the search area for a particular text string.
f.
text_after
Defines the end of the search area for a particular text string.
2)
Which TSL functions you will use for
a)
Searching text on the window
i.
find_text ( string,
out_coord_array, search_area [, string_def ] );
string
The string that is searched for. The string must
be complete, contain no spaces, and it must be preceded and followed by a space
outside the quotation marks. To specify a literal, case-sensitive string,
enclose the string in quotation marks. Alternatively, you can specify the name
of a string variable. In this case, the string variable can include a regular
expression.
out_coord_array
The name of the array that stores the
screen coordinates of the text (see explanation below).
search_area
The area to search, specified as
coordinates x1,y1,x2,y2. These define any two diagonal corners of a rectangle.
The interpreter searches for the text in the area defined by the rectangle.
string_def
Defines the type of search to perform.
If no value is specified, (0 or FALSE, the default), the search is for a single
complete word only. When 1, or TRUE, is specified, the search is not restricted
to a single, complete word.
b)
getting the location of the text
string
i.
win_find_text ( window,
string, result_array [, search_area [, string_def ] ] );
window
The logical name of the window to search.
string
The text to locate. To specify a literal, case sensitive string, enclose the
string in quotation marks. Alternatively, you can specify the name of a string
variable. The value of the string variable can include a regular expression. The
regular expression should not include an exclamation mark (!), however, which is
treated as a literal character. For more information regarding Regular
Expressions, refer to the "Using Regular Expressions" chapter in your User's
Guide.
result_array
The name of the output variable that stores the location of the string as a
four-element array.
search_area
The region of the object to search, relative to the window. This area is defined
as a pair of coordinates, with x1,y1,x2,y2 specifying any two diagonally
opposite corners of the rectangular search region. If this parameter is not
defined, then the entire window is considered the search area.
string_def
Defines how the text search is performed. If no string_def is specified, (0 or
FALSE, the default parameter), the interpreter searches for a complete word
only. If 1, or TRUE, is specified, the search is not restricted to a single,
complete word.
c)
Moving the pointer to that text
string
i.
win_move_locator_text
(window, string [ ,search_area [ ,string_def ] ] );
window
The logical name of the window.
string
The text to locate. To specify a literal, case sensitive string, enclose the
string in quotation marks. Alternatively, you can specify the name of a string
variable. The value of the string variable can include a regular expression (the
regular expression need not begin with an exclamation mark).
search_area
The region of the object to search, relative to the window. This area is defined
as a pair of coordinates, with x1, y1, x2, y2 specifying any two diagonally
opposite corners of the rectangular search region. If this parameter is not
defined, then the entire window specified is considered the search area.
string_def
Defines how the text search is performed. If no string_def is specified, (0 or
FALSE, the default parameter), the interpreter searches for a complete word
only. If 1, or TRUE, is specified, the search is not restricted to a single,
complete word.
d)
Comparing the text
i.
compare_text (str1, str2
[, chars1, chars2]);
str1,
str2 The two strings to be compared.
chars1
One or more characters in the first string.
chars2
One or more characters in the second string. These characters are substituted
for those in chars1.
|