background image
<< Test Frame - GUI-specific internal ID | Test Frame - Using class-specific multiple tags >>
Test Frame - What happens by default
<< Test Frame - GUI-specific internal ID | Test Frame - Using class-specific multiple tags >>
User's Guide
87
4 R
ECORDING
A
T
EST
F
RAME
Window declaration syntax and structure
These are the possible tags that can be used by SilkTest to identify the Case
Sensitive check box when recording or executing testcases.
What happens by
default
You can record more than one tag for an object. Doing so makes scripts less
sensitive to changes when the tests are run. For example, if you record a
caption and a window ID for a control, then even if the caption on the control
changes (such as the caption "Case Sensitive" changing to "Case is
significant"), SilkTest can still find the control based on its window ID.
This is particularly an issue in situations where captions change dynamically,
such as in MDI applications where the window title changes each time a
different child window is made active.
By default, when you record window declarations, each object is given two
tags: the caption (if there is one) and the Window ID (if there is one). Notice
in the Record Declarations dialog shown above that two tags are checked in
the Tag Information box: Caption and Window ID.
For example, here is the default recorded declaration for the Case Sensitive
check box:
CheckBox CaseSensitive
multitag "Case sensitive"
"$1041"
SilkTest specifies multiple tags in a declarations file using the multitag
statement
. In the previous example, the check box is declared with two tags:
·
The string "Case sensitive", which is its caption
·
The string "$1041", which is its Window ID
For complete information about the multitag statement, see "multitag
statement" in online Help.
Specifying which tags
to record
When you are recording declarations, you can select any combination of tags
to record by selecting check boxes in the Tag Information group box in the
Record Window Declarations dialog. You can record different tags for
different objects.
You can also specify which tags you want recorded by default.
Procedure To change which tags are recorded by default for GUI objects:
1
Select Record/Window Declarations.
Window ID
$1041
Location
@(57,65)
Tag type
Value
Comment