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. GetChildren is sometimes called 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 is used 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.

The GetChildren method is called 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, the GetChildren method is called to return the buttons for the Calculator application when the following steps are run in a GUI test:

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