Creating a
Standard Checkpoint
·
Click the Insert Checkpoint toolbar button or choose Insert > Checkpoint >
Standard Checkpoint.
- Click the object you want to
check. The Select an Object dialog box opens.
- Select the item you want to
check from the displayed object tree.
- Click OK. The Checkpoint
Properties dialog box opens.
- Specify the settings for the
checkpoint.
- Click OK to close the dialog
box.
Creating a Text
Checkpoint
·
Display the page, window, or screen containing the
text you want to check.

Choose Insert > Checkpoint > Text Checkpoint, or click the arrow next to the Insert Checkpoint button and Choose Text Checkpoint.- The Quick Test window is
minimized and the mouse pointer turns into a pointing hand.
- Click the text string for
which you want to create the checkpoint. If the area you defined is
associated with more than one object, the Object Selection–Text Checkpoint
Properties dialog box opens. Select the required object
- The Text Checkpoint
Properties dialog box opens.
- Specify the checkpoint
settings.
- Click OK to close the dialog
box.
Use regular
expressions
Regular
expressions enable Quick Test to identify objects and text strings with varying
values.
You can use regular expressions when:
- Defining the property values
of an object
- Parameterize a step
- Creating checkpoints with
varying values
For example, if a window title bar's name changes according to a file name,
you can use a regular expression to identify a window whose title bar has the
specified product name, followed by a hyphen, and then any other text.
A
regular expression is a string that specifies a complex search phrase. By using
special characters such as a period (.), asterisk (*), caret (^), [A-Z] and
brackets ([ ]), you can define the conditions of a search. When one of
these special characters is preceded by a backslash (\), Quick Test searches
for the literal character.
To define a
constant property value as a regular expression:
- Open the Object Properties dialog box
for the object either form test tree or from Active Screen or from Object
Repository
- In the Property column, select the
property you want to set as a regular expression.
- In the Edit value section, click
Constant.
- Click the Edit Constant Value Options
button. The Constant Value Options dialog box pens.
- Select the Regular Expression check
box.
- In the Value box, enter the regular
expression syntax for the string.
- Click OK to close the Constant Value
Options dialog box.
- Click OK to save and close the Object
Properties
To parameterize a
property value using regular expressions:
Covered in Data
Driving a Test
To define a
regular expression in an object checkpoint:
- Display the page, window, or screen
containing the text you want to check.
- Choose Insert > Checkpoint > Text
Checkpoint, or click the arrow next to the Insert Checkpoint button and
choose Text Checkpoint.
- Click the text string for which you
want to create the checkpoint.
- Select the object for which you are
creating the checkpoint. The Text
Checkpoint Properties dialog box opens.
- In the Edit value section, click
Constant.
- Click the Edit Constant Value Options
button. The Constant Value Options dialog box opens.
- Select the Regular Expression check
box.
- In the Value box, enter the regular
expression syntax for the string.
- Click OK to close the Constant Value
Options dialog box.
- Click OK to save and close Text
Checkpoint Properties dialog box.
Common options to
create regular expressions.
.
|
Matching
Any Single Character
|
[xy]
|
Matching
Any Single Character in a List
|
[^xy]
|
Matching
Any Single Character Not in a List
|
[x-y]
|
Matching
Any Single Character within a Range
|
*
|
Matching
Zero or More Specific Characters
|
+
|
Matching
One or More Specific Characters
|
?
|
Matching
Zero or One Specific Character
|
( )
|
Grouping
Regular Expressions
|
|
|
Matching
One of Several Regular Expressions
|
^
|
Matching
the Beginning of a Line
|
$
|
Matching
the End of a Line
|
\w
|
Matching
Any Alphanumeric Character Including the Underscore
|
\W
|
Matching
Any Non-Alphanumeric Character
|
You can combine regular expression operators in a single expression to
achieve the exact search criteria you need.

No comments:
Post a Comment