background image
<< Lesson 7 Using Regular Expressions | Special characters >>
<< Lesson 7 Using Regular Expressions | Special characters >>
Regular Expression Syntax
Lesson 7 Using Regular Expressions
64
Working with Regular Expressions
In this tutorial, you will create a text checkpoint on a date text string that
changes according to the selected flight date. You can define the date as a
regular expression so that the checkpoint checks that the captured text
string matches the expected format, rather than checking the exact text.
To do this, you will create a text checkpoint with a regular expression that
will match any single character within a defined range.
1 Start QuickTest and open the Recording test.
If QuickTest is not already open, choose Start > Programs > QuickTest
Professional > QuickTest Professional
.
If the Welcome window opens, click Open Existing.
If QuickTest opens without displaying the Welcome window, choose
File > Open or click the Open button.
In the Open Test dialog box, locate and select the Recording test, then click
Open.
2 Save the test as RegExpression.
Select File > Save As. Save the test as
RegExpression
.
3 Confirm that the Active Screen option is enabled.
If you do not see the Active Screen at the bottom of the QuickTest window,
click the Active Screen button, or choose View > Active Screen.
4 Select the text for which you will create the checkpoint.
In the Keyword View, expand (+) Welcome: Mercury: Tours and click the
Select a Flight: Mercury page. The page is displayed in the Active Screen.
In the Active Screen, scroll up and highlight the date for the outbound
flight, New York to San Francisco (
12/29/2004
). Right-click the highlighted
string and select Insert Text Checkpoint. The Text Checkpoint Properties
dialog box opens.