background image
<< Class Hierarchy - Defining new class properties | Class Hierarchy - To make the NumChildren class property >>
Class Hierarchy - Defining new verification properties
<< Class Hierarchy - Defining new class properties | Class Hierarchy - To make the NumChildren class property >>
User's Guide
309
16 E
XTENDING
THE
C
LASS
H
IERARCHY
Defining new verification properties
-
Class properties, defined using the property statement
-
Variables of the class or individual object
Any properties you define in lsPropertyNames will override built-in
properties with the same name.
With your custom verification properties listed as elements in
lsPropertyNames, when you record and run a testcase, those additional
properties will be available during verification.
Tip You can add your custom properties to property sets. See
"Configuring your own property sets" on page 121.
Confirming the
property list
You can use the GetPropertyList method to confirm the list of verification
properties for an object. For example, the following simple testcase prints the
list of all the verification properties of the Find dialog to the results file:
testcase FindDialogPropertyConfirm ()
TextEditor.Search.Find.Pick ()
ListPrint (Find.GetPropertyList ())
Find.Cancel.Click ()
For more information about GetPropertyList, see online Help.
Example
Let's look at an example of defining a custom verification property. Say you
want to test a dialog box. Dialog boxes come with built-in verification
properties, as shown in the following illustration:
And let's say that you have defined a class property, NumChildren, that you
want to make available to the verification system.