background image
<< Class Hierarchy - To make the NumChildren class property | Class Hierarchy - Default Button attribute >>
Class Hierarchy - Defining new attributes
<< Class Hierarchy - To make the NumChildren class property | Class Hierarchy - Default Button attribute >>
User's Guide
311
16 E
XTENDING
THE
C
LASS
H
IERARCHY
Defining new attributes
An alternative Instead of defining NumChildren as a class property, you
could also define it as a variable, then initialize the variable in a script. For
example, in your include file, you would have:
winclass DialogBox : DialogBox
INTEGER NumChild2
// list of custom verification properties
LIST OF STRING lsPropertyNames = {"NumChild2"}
And in your script--before you do the verification--you would initialize the
value for the dialog box under test, such as:
Find.NumChild2 = ListCount (Find.GetChildren ())
Defining new attributes
When you are recording a testcase, you can verify using attributes.
Note You can choose to verify using either attributes or properties;
generally you will verify using properties because property
verification is more flexible. For more information on verifying
using properties and attributes, see Chapter 5, "Designing and
Recording Testcases".
For example, the following figure shows the attributes for the DialogBox
class: