Implement this method in the custom server. It is called by UFT to determine if an element should be learned, or whether it is part of a higher-level control. If part of a higher-level control, the element is learned as part of that containing control.
A control can be composed of elements, but the properties and behaviors are associated with the control rather than the individual elements. For example, a calendar may contain buttons and listboxes, but the logical behaviors and properties belong to the calendar, not to the buttons and listboxes. For example, the "month" property is a property of the calendar control, not the contained month listbox.
If the control is to be learned as a single unit, the child elements are not learned. In this case, return true for the contained elements.
UFT may call this method for any control, not only on the control that this custom server supports. Therefore, in your implementation, use only the parameters passed to the method. Do not use the UtilityObject or any data members defined in the custom server.
|Visual Basic (Declaration)|
- A reference to a control supported by the custom server. For example, a calendar control.
- A reference to a child control of the Parent element.
Return ValueReturns true to indicate to UFT that the child element is not to be learned.
The following method, implemented in an accordion custom server, returns false if the specified child is contained in the expandable content part of an accordion item. In this case it might be a custom control embedded inside the accordion, and should not be treated as part of the accordion.