And let's say that you have defined a class property, NumChildren, that you want to make available to the verification system.
property NumChildren INTEGER Get () return ListCount (GetChildren ())
That property returns the number of children in the object, as follows:
winclass DialogBox : DialogBox // user-defined property property NumChildren INTEGER Get () return ListCount (GetChildren ()) // list of custom verification properties LIST OF STRING lsPropertyNames = {"NumChildren"}
Now when you verify a dialog box in a test case, you can verify your custom property since it will display in the list of DialogBox properties to verify.
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 ())