Implementing GetChildren

OpenText Functional Testing calls GetChildren to retrieve the object IDs of the objects directly contained by the object specified in the method call. OpenText Functional Testing sometimes calls GetChildren recursively to get the entire tree of the objects descendents. The object passed to the method can be a member of the application's environment or the external parent.

GetChildren returns an array of object IDs. If the specified object has no children, GetChildren returns NULL.

The GetChildren method also receives a filter argument, which OpenText Functional Testing can use to request only a subset of the object's children. The GetChildren method must return all of the object's children whose property values match all of the values specified in the filter.

OpenText Functional Testing calls the GetChildren method in various situations, to retrieve information about test object hierarchy. The GetChildren method is also called when a test includes the ChildObjects() test object operation. For example, OpenText Functional Testing calls the GetChildren method to return the buttons for the Calculator application when the following steps are run in an OpenText Functional Testing GUI test:

Set desc2 = Description.Create() 
desc2("micclass").Value = "WinButton"
Set container2 = Window("Calculator")
Set childObjects2 = container2.ChildObjects(desc2)
MsgBox childObjects2.Count