Understanding the Object Learn Chain of Events
When learning an object, UFT One 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 One 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 One to enable the user to select the types of descendants to learn.
Next, UFT One 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 One 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 One calls GetElementFromPoint, a member of the ISpyable interface. After retrieving the object ID of the specified object, UFT One calls GetElementType and GetParent for each object in the hierarchy. GetElementType and GetParent are members of the ITestable interface.