background image
<< Testcase - Y2KRulesInherited | Testcase - SilkTest logs >>
Testcase - winclass.inc file
<< Testcase - Y2KRulesInherited | Testcase - SilkTest logs >>
User's Guide
205
8 G
ENERALIZING
A
T
ESTCASE
Testing applications that have been made Year 2000 compliant
Default behavior
When you first install SilkTest, your winclass.inc file contains the following
declaration within the AnyWin class:
setting Y2KRules = "UseContainer"
This declaration tells SilkTest to perform Y2K transformations for all
windows, according to the precedence rules described for Y2KRules.
Examples
Suppose you have a dialog box called ShowDates that contains two text
fields. Initially, you want the dates in all of its text fields to be transformed to
the format mmmm dd, yyyy. To enforce this behavior, place the following
statement inside the ShowDates declaration:
setting Y2KRulesInherited="mm/dd/yy|0|0|0|mmmm dd, yyyy|0"
Later, you realize that the dates in one of the text fields, called
TheSingleLine, must be transformed to the format mm-dd-yyy for a
particular report. To meet this requirement, add the following statement
inside the declaration for TheSingleLine:
setting Y2KRules="mm/dd/yy|0|0|0|mm-dd-yyyy|0"
This new rule will override the inherited rule for TheSingleLineTextField text
field. Note that we use Y2KRules because we are applying this rule to a
single control. If TheSingleLineTextField had child controls that needed to
inherit this rule, we would have used the Y2KRulesInherited construct
instead.
Here's how these declarations appear in the test frame file:
"rule"
Applies rule to a class or object and all of the
object's children.
For information about how to specify rule,
see the description of the TransformDate
function in the online Help.
NULL
Disables Y2K transformations for a
particular class or object.
Transformations will also be disabled for the
object's child controls unless you defined a
rule using Y2KRules at a level in the class
hierarchy that applies to one of the controls.
setting Y2KRulesInherited =
Action