An Alternative to NumChildren as a Class Property

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 ())