IUIAutomation interface (uiautomationclient.h)
Exposes methods that enable Microsoft UI Automation client applications to discover, access, and filter UI Automation elements. UI Automation exposes every element of the UI Automation as an object represented by the IUIAutomation interface. The members of this interface are not specific to a particular element.
Inheritance
The IUIAutomation interface inherits from the IUnknown interface. IUIAutomation also has these types of members:
Methods
The IUIAutomation interface has these methods.
IUIAutomation::AddAutomationEventHandler Registers a method that handles Microsoft UI Automation events.Note Before implementing an event handler, you should be familiar with the threading issues described in Understanding Threading Issues. |
IUIAutomation::AddFocusChangedEventHandler Registers a method that handles focus-changed events.Note Before implementing an event handler, you should be familiar with the threading issues described in Understanding Threading Issues. |
IUIAutomation::AddPropertyChangedEventHandler Registers a method that handles and array of property-changed events. |
IUIAutomation::AddPropertyChangedEventHandlerNativeArray Registers a method that handles a native array of property-changed events. |
IUIAutomation::AddStructureChangedEventHandler Registers a method that handles structure-changed events.Note Before implementing an event handler, you should be familiar with the threading issues described in Understanding Threading Issues. |
IUIAutomation::CheckNotSupported Checks a provided VARIANT to see if it contains the Not Supported identifier. |
IUIAutomation::CompareElements Compares two UI Automation elements to determine whether they represent the same underlying UI element. |
IUIAutomation::CompareRuntimeIds Compares two integer arrays containing run-time identifiers (IDs) to determine whether their content is the same and they belong to the same UI element. |
IUIAutomation::CreateAndCondition Creates a condition that selects elements that match both of two conditions. |
IUIAutomation::CreateAndConditionFromArray Creates a condition that selects elements based on multiple conditions, all of which must be true. |
IUIAutomation::CreateAndConditionFromNativeArray Creates a condition that selects elements from a native array, based on multiple conditions that must all be true. |
IUIAutomation::CreateCacheRequest Creates a cache request. |
IUIAutomation::CreateFalseCondition Creates a condition that is always false. |
IUIAutomation::CreateNotCondition Creates a condition that is the negative of a specified condition. |
IUIAutomation::CreateOrCondition Creates a combination of two conditions where a match exists if either of the conditions is true. |
IUIAutomation::CreateOrConditionFromArray Creates a combination of two or more conditions where a match exists if any of the conditions is true. |
IUIAutomation::CreateOrConditionFromNativeArray Creates a combination of two or more conditions where a match exists if any one of the conditions is true. |
IUIAutomation::CreatePropertyCondition Creates a condition that selects elements that have a property with the specified value. |
IUIAutomation::CreatePropertyConditionEx Creates a condition that selects elements that have a property with the specified value, using optional flags. |
IUIAutomation::CreateProxyFactoryEntry Creates a new instance of a proxy factory object. |
IUIAutomation::CreateTreeWalker Retrieves a tree walker object that can be used to traverse the Microsoft UI Automation tree. |
IUIAutomation::CreateTrueCondition Retrieves a predefined condition that selects all elements. |
IUIAutomation::ElementFromHandle Retrieves a UI Automation element for the specified window. |
IUIAutomation::ElementFromHandleBuildCache Retrieves a UI Automation element for the specified window, prefetches the requested properties and control patterns, and stores the prefetched items in the cache. |
IUIAutomation::ElementFromIAccessible Retrieves a UI Automation element for the specified accessible object from a Microsoft Active Accessibility server. |
IUIAutomation::ElementFromIAccessibleBuildCache Retrieves a UI Automation element for the specified accessible object from a Microsoft Active Accessibility server, prefetches the requested properties and control patterns, and stores the prefetched items in the cache. |
IUIAutomation::ElementFromPoint Retrieves the UI Automation element at the specified point on the desktop. |
IUIAutomation::ElementFromPointBuildCache Retrieves the UI Automation element at the specified point on the desktop, prefetches the requested properties and control patterns, and stores the prefetched items in the cache. |
IUIAutomation::get_ContentViewCondition Retrieves a predefined IUIAutomationCondition interface that selects content elements. |
IUIAutomation::get_ContentViewWalker Retrieves an IUIAutomationTreeWalker interface used to discover content elements. |
IUIAutomation::get_ControlViewCondition Retrieves a predefined IUIAutomationCondition interface that selects control elements. |
IUIAutomation::get_ControlViewWalker Retrieves an IUIAutomationTreeWalker interface used to discover control elements. |
IUIAutomation::get_ProxyFactoryMapping Retrieves an object that represents the mapping of Window classnames and associated data to individual proxy factories. |
IUIAutomation::get_RawViewCondition Retrieves a predefined IUIAutomationCondition interface that selects all UI elements in an unfiltered view. |
IUIAutomation::get_RawViewWalker Retrieves a tree walker object used to traverse an unfiltered view of the Microsoft UI Automation tree. |
IUIAutomation::get_ReservedMixedAttributeValue Retrieves a static token object representing a text attribute that is a mixed attribute. |
IUIAutomation::get_ReservedNotSupportedValue Retrieves a static token object representing a property or text attribute that is not supported. |
IUIAutomation::GetFocusedElement Retrieves the UI Automation element that has the input focus. |
IUIAutomation::GetFocusedElementBuildCache Retrieves the UI Automation element that has the input focus, prefetches the requested properties and control patterns, and stores the prefetched items in the cache. |
IUIAutomation::GetPatternProgrammaticName Retrieves the registered programmatic name of a control pattern. |
IUIAutomation::GetPropertyProgrammaticName Retrieves the registered programmatic name of a property. |
IUIAutomation::GetRootElement Retrieves the UI Automation element that represents the desktop. |
IUIAutomation::GetRootElementBuildCache Retrieves the UI Automation element that represents the desktop, prefetches the requested properties and control patterns, and stores the prefetched items in the cache. |
IUIAutomation::IntNativeArrayToSafeArray Converts an array of integers to a SAFEARRAY. |
IUIAutomation::IntSafeArrayToNativeArray Converts a SAFEARRAY of integers to an array. |
IUIAutomation::PollForPotentialSupportedPatterns Retrieves the control patterns that might be supported on a UI Automation element. |
IUIAutomation::PollForPotentialSupportedProperties Retrieves the properties that might be supported on a UI Automation element. |
IUIAutomation::RectToVariant Creates a VARIANT that contains the coordinates of a rectangle. |
IUIAutomation::RemoveAllEventHandlers Removes all registered Microsoft UI Automation event handlers. |
IUIAutomation::RemoveAutomationEventHandler Removes the specified UI Automation event handler. |
IUIAutomation::RemoveFocusChangedEventHandler Removes a focus-changed event handler. |
IUIAutomation::RemovePropertyChangedEventHandler Removes a property-changed event handler. |
IUIAutomation::RemoveStructureChangedEventHandler Removes a structure-changed event handler. |
IUIAutomation::SafeArrayToRectNativeArray Converts a SAFEARRAY containing rectangle coordinates to an array of type RECT. |
IUIAutomation::VariantToRect Converts a VARIANT containing rectangle coordinates to a RECT. |
Remarks
Every UI Automation client application must obtain this interface to a CUIAutomation object in order to gain access to the functionality of UI Automation.
The following example function creates a CUIAutomation object and obtains the IUIAutomation interface.
IUIAutomation *g_pAutomation;
BOOL InitializeUIAutomation()
{
CoInitialize(NULL);
HRESULT hr = CoCreateInstance(__uuidof(CUIAutomation), NULL, CLSCTX_INPROC_SERVER,
__uuidof(IUIAutomation), (void**)&g_pAutomation);
return (SUCCEEDED(hr));
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationclient.h (include UIAutomation.h) |