Open topic with navigation
When learning an object, UFT first builds the test object hierarchy. Then, if the user clicked a location that is associated with more than one object, the Object Selection dialog box opens. After the user selects the required object, UFT calls the GetChildren method with an empty filter argument (that is, it contains only the XML root element <Filter/>). This requires the Testing Agent to return all of the immediate children of the specified object.
If the specified object has children, the Define Object Filter dialog box opens in UFT to enable the user to select the types of descendants to learn.
Next, UFT calls the LearnChildObjects method to retrieve the object IDs and descriptions for the specified object and all of its ancestors and descendants.
The following diagram shows the general sequence of methods that UFT calls when learning a object. This diagram illustrates the purpose of the methods that the Testing Agent must implement and the interfaces to which these methods belong. For example, UFT calls GetElementFromPoint, a member of the ISpyable interface. After retrieving the object ID of the specified object, UFT calls GetElementType and GetParent for each object in the hierarchy. GetElementType and GetParent are members of the ITestable interface.