Fact-checked by Grok 2 weeks ago

Microsoft UI Automation

Microsoft UI Automation (UIA) is an accessibility framework for Microsoft Windows that enables assistive technology applications, such as screen readers, and automated testing tools to interact with the (UI) controls of other applications by providing programmatic access to most UI elements on the desktop. It masks differences across diverse control frameworks, including Win32, Windows Presentation Foundation (WPF), and , allowing for consistent interaction regardless of the underlying technology. Introduced with the .NET Framework 3.0 in November 2006 and available on with 2 and later via runtime updates, Automation succeeded Microsoft Active Accessibility (MSAA), the earlier accessibility standard that had been available as a platform add-on since Windows 95. The framework was initially released with a managed but was rewritten using (COM) interfaces starting with to improve compatibility and performance across a wider range of applications. This evolution addressed MSAA's limitations, such as its static properties, ambiguous navigation, and inability to support modern UI behaviors like rich text models or extensible events. At its core, Microsoft UI Automation represents the UI as a hierarchical , with the serving as the and individual elements accessible via the IUIAutomationElement interface. Key features include predefined control types that categorize UI elements (e.g., buttons, menus), control patterns that define interactive behaviors (e.g., invocation, selection), and an event system that notifies clients of changes without relying on broadcasts, enabling efficient, targeted updates. Unlike MSAA's fixed roles and properties, UIA supports custom properties, multiple roles per element, and a unified text object model for advanced accessibility needs. Microsoft UI Automation is used by applications acting as providers to expose their UI elements or as clients to query and manipulate them, supporting both and scenarios. The framework provides separate APIs: a COM-based client and provider API in UIAutomationCore.dll for Win32 applications, and managed classes in the System.Windows.Automation namespace (via assemblies like UIAutomationClient.dll) for .NET developers, with native integration for WPF controls through AutomationPeer classes. It maintains backward compatibility with MSAA through proxy support in Oleacc.dll and the IAccessibleEx interface, allowing legacy applications to bridge to UIA without full rewrites. The framework is supported on , , and all subsequent versions, with managed support in .NET Framework 3.0 and later, including .NET (formerly .NET Core) 3.0 and later on Windows.

History and Development

Origins in Accessibility Frameworks

Microsoft Active Accessibility (MSAA), the primary predecessor to Microsoft UI Automation, was introduced in 1997 as a platform add-on for , enabling basic programmatic access to elements through the IAccessible interface. This interface provided a simple mechanism for assistive technologies to query and interact with UI components, such as retrieving names, roles, and states of controls in standard Windows applications. MSAA's design emphasized compatibility with existing Win32 applications, allowing screen readers and other tools to expose UI elements in a hierarchical structure similar to the Windows object model. Despite its foundational role, MSAA exhibited significant limitations that hindered its effectiveness for evolving software paradigms, particularly in fragmented property exposure and inadequate support for rich, dynamic user interfaces. The IAccessible interface offered only a limited set of properties—such as name, value, and description—resulting in incomplete representations of complex controls, where assistive technologies often received inconsistent or partial information. Navigation through the UI hierarchy was also constrained, as MSAA relied on parent-child relationships that did not scale well to modern applications like those built with emerging graphical frameworks, leading to challenges in supporting technologies such as Windows Presentation Foundation (WPF). These shortcomings became increasingly evident as applications incorporated advanced visuals and behaviors beyond MSAA's static model. In response, initiated efforts in the early 2000s to unify across diverse platforms, including Win32, .NET, and HTML-based interfaces, culminating in the conceptualization of UI Automation around 2003. This work aligned with the development of —the codename for what became WPF—aiming to create a more robust framework that addressed MSAA's gaps by providing richer semantic information and better integration for assistive tools. UI Automation's managed was released on November 6, 2006, with the .NET Framework 3.0, with pledging irrevocable patent rights for its implementation. By 2006, UI Automation saw its initial integration with the .NET Framework 3.0, enabling native support for WPF applications and marking a shift toward a comprehensive model.

Release Versions and Evolution

Microsoft UI Automation (UIA) was initially released in 2006 as part of the .NET Framework 3.0, providing a managed primarily focused on and automation for Windows Presentation Foundation (WPF) applications. This release marked the framework's debut as a successor to earlier technologies, emphasizing programmatic access to UI elements in .NET-based environments. In 2007, with the launch of , UIA was integrated into the operating system, providing initial (COM)-based provider support to enable broader adoption beyond .NET applications through server-side providers. The Windows Automation API 3.0, which added support for multi-threading, proxy factories for remote access, and enhanced unmanaged client interfaces to improve reliability and interoperability, was introduced with in 2009. Full integration of these advancements occurred in in 2009, where UIA became a core component of the Windows Automation API, offering improved event handling and element discovery for desktop applications. Following 2010, UIA evolved to support emerging UI paradigms across Windows versions. Windows 8 and 8.1 (2012–2014) extended UIA compatibility to touch-enabled interfaces, allowing automation of gesture-based interactions in Metro-style apps. In Windows 10 (2015), UIA gained native support for the Universal Windows Platform (UWP), enabling cross-device UI access and testing through tools like WinAppDriver. Windows 11 (2021) further aligned UIA with WinUI 3, incorporating automation peers for modern controls to ensure accessibility in Fluent Design-based applications. As of 2025, UIA has not seen major version increments, but has issued documentation updates, such as those in July 2025. Additionally, the Mono project has ported UIA for cross-platform use since 2009, implementing the specification to support in non-Windows .NET environments.

Design Principles and Goals

Addressing Limitations of Predecessors

Microsoft UI Automation (UIA) was developed to address key shortcomings in its predecessor, Microsoft Active Accessibility (MSAA), by introducing a more robust and flexible framework for exposing user interface elements to assistive technologies and automation tools. Unlike MSAA's role-based model, which relies on discrete accessibility roles such as ROLE_SYSTEM_SLIDER to categorize UI elements with limited associated properties and methods, UIA employs an element-based tree structure represented by IUIAutomationElement interfaces. This hierarchical approach provides richer, more detailed exposure of UI data, including control types like sliders or buttons, enabling clients to navigate and query the entire UI tree more intuitively and comprehensively. Performance limitations in MSAA, stemming from its reliance on per-element queries and extensive tree traversals via Windows event routing and hooks, often resulted in high overhead and slower response times, particularly for out-of-process clients. UIA mitigates these issues through an event-driven model that allows clients to subscribe to specific events with fine-tuned filters, reducing the need for constant polling and enabling efficient caching of properties. This design can deliver up to 400% faster performance in certain out-of-process scenarios compared to MSAA, thanks to its core service architecture that handles cross-process communication without the inefficiencies of MSAA's COM-based "chatty" interactions. MSAA's support for UI interactions was constrained by fixed methods, such as accSelect, which lacked native handling for complex behaviors like expand/collapse operations, forcing assistive technologies to rely on brittle workarounds or platform-specific assumptions. In contrast, introduces standardized control patterns—such as ExpandCollapsePattern for tree views or TogglePattern for switches—that can be combined to describe diverse functionalities, providing a consistent and extensible way to interact with custom or composite controls across applications. These patterns enhance reliability for and by decoupling behavior from simple role assignments. MSAA's fragmented support, primarily tailored to Win32 applications through its COM-based interface, struggled to accommodate modern UI frameworks like Windows Presentation Foundation (WPF) or , leading to inconsistent exposure and developer overhead. UIA unifies this landscape by offering a single that seamlessly exposes elements from Win32, WPF, , and even HTML content in browsers, with both managed (.NET) and unmanaged implementations to support a broader ecosystem. This consolidation simplifies development and ensures more uniform across diverse Windows applications. To maintain without requiring immediate migration, UIA incorporates coexistence strategies, including the IUIAutomationLegacyIAccessiblePattern that allows UIA providers to proxy MSAA properties and methods directly. Additionally, the UIA-to-MSAA Bridge enables legacy MSAA clients to access UIA-enabled applications by converting the element tree and patterns on-the-fly, while the IAccessibleEx extension permits MSAA servers to incrementally support UIA without full rewrites. These mechanisms ensure a smooth transition, preserving the vast existing investments in MSAA-based tools.

Objectives for Accessibility and Automation

Microsoft UI Automation (UIA) primarily aims to deliver programmatic access to user interface elements, enabling assistive technologies such as screen readers (including Narrator) and magnifiers to interpret and interact with dynamic user interfaces in real time. This access supports the exposure of UI controls as navigable objects, allowing assistive tools to provide audio descriptions, magnification, or alternative input methods for users with disabilities, thereby promoting inclusive computing experiences across Windows applications. By facilitating immediate updates to UI representations, UIA ensures that changes in content—such as those in web browsers or modern applications—are conveyed without delay, enhancing usability for assistive technology users. In parallel, UIA's automation objectives focus on empowering scriptable interactions for graphical user interface testing, which streamlines quality assurance processes by minimizing manual intervention. Automated testing tools can leverage UIA to simulate user actions, verify control states, and validate application behavior programmatically, fostering more efficient development cycles and reducing errors in software validation. This capability extends to third-party automation frameworks, enabling consistent scripting across diverse testing scenarios without requiring application-specific adaptations. A core goal of UIA is to standardize UI exposure irrespective of the underlying framework, such as Win32, WPF, or , thereby simplifying development for and tool creators. This uniformity masks framework differences, ensuring that properties like element names and roles are reliably accessible, which aids in building robust, cross-application solutions. Additionally, UIA incorporates extensibility for custom properties, allowing providers to define application-specific attributes while maintaining compatibility with standard interfaces. To future-proof accessibility and , UIA is designed with adaptability for evolving paradigms, including support for Windows platforms that incorporate touch and gesture inputs, ensuring long-term relevance. It operates under a non-replacement , coexisting seamlessly with Microsoft Active Accessibility (MSAA) through bridging mechanisms that prevent disruption to legacy assistive technologies. This approach allows gradual adoption while preserving the functionality of existing MSAA-dependent tools.

Architectural Overview

Client-Server Model

Microsoft UI Automation employs a client-server that separates the responsibilities of accessing and exposing elements. On the , applications or tools—such as assistive technologies, automated testing frameworks, or screen readers—interact with the UI by querying the automation element tree and invoking control patterns through the IUIAutomation interface. These clients, implemented in .NET via libraries like UIAutomationClient.dll or directly via , retrieve properties, navigate the tree, and perform actions on elements without directly modifying the underlying UI. On the server side, the core functionality is managed by UIAutomationCore.dll, which orchestrates the overall framework and maintains the shared automation element tree representing the desktop and all accessible UI elements. Individual applications implement server-side providers—typically as in-process DLLs or integrated components for frameworks like Win32, , or WPF—that expose their UI data, properties, and patterns to this tree. These providers populate the tree with element information, enabling a unified view across processes while ensuring that UI-specific details remain encapsulated within the application. Communication between clients and servers occurs primarily out-of-process using COM marshaling, which packages interface pointers and data for secure transmission across process boundaries via proxies and stubs. This model supports interoperability but introduces overhead; for same-process scenarios, clients can access the raw view of the automation tree directly, bypassing some filtering and marshaling steps to improve performance by providing unfiltered access to the full element hierarchy. The threading model requires providers to operate with UI thread affinity, as they interact with UI elements bound to the application's main thread to ensure thread-safe access to window properties and states. Clients, however, support operations on both UI and background threads; starting with UI Automation 3.0 (introduced in Windows 8), enhanced COM multithreaded apartment (MTA) support allows non-UI thread execution without blocking the application's responsiveness, provided proper initialization with CoInitializeEx(COINIT_MULTITHREADED). Security in this model aligns with Windows User Account Control: providers execute with the privileges of their host application, limiting exposure of sensitive UI data to the app's security context. Clients seeking cross-process access, particularly to elevated or protected processes, must declare uiAccess="true" in their application to obtain an elevated , enabling marshaled calls while preventing unauthorized elevation from standard user contexts.

Provider and Client Interfaces

Microsoft UI Automation defines distinct interfaces for providers and clients to facilitate communication in its client-server , where providers expose UI elements and clients query and interact with them. Provider interfaces primarily consist of server-side implementations that enable applications to supply information about their UI elements to the automation framework. For custom UI elements, developers implement the IUIAutomationElementProvider interface, which exposes the element's properties, patterns, and behaviors to Automation clients for and automation purposes. Built-in providers handle standard controls across frameworks: Win32 applications use server-side providers integrated via window messages and plugins for common controls like buttons and list boxes; WPF employs server-side providers integrated into the framework via AutomationPeer classes, which expose XAML-based controls to the automation tree; and UWP leverages the Windows.UI.Xaml.Automation.Provider namespace for native exposure of XAML-based controls. To support navigation in complex or fragmented UI structures, such as multi-level controls like list boxes, providers implement the IRawElementProviderFragment interface, which defines relationships like parent, children, and siblings within the UI Automation element tree. Registration of providers occurs through standard Windows messages, such as WM_GETOBJECT, where the provider returns an IRawElementProviderSimple interface for basic elements or IRawElementProviderFragmentRoot for root fragments, ensuring seamless integration without additional runtime overhead. Events from providers are raised using functions like UiaRaiseAutomationEvent, allowing clients to receive notifications about changes, with optimization via IRawElementProviderAdviseEvents to inform when clients are listening. On the , the core IUIAutomation serves as the for applications, enabling and of the UI tree through methods like GetRootElement to access the desktop root and condition-based queries such as CreatePropertyCondition for filtering elements by specific properties. Clients register for events using AddAutomationEventHandler, specifying an event ID, target element, tree scope (e.g., descendants or subtree), optional cache request, and handler implementation to receive notifications like property changes or invocations. Version-specific APIs reflect the evolution of UI Automation: version 2.0, introduced with Windows 7, relies on Component Object Model (COM) interfaces defined in UIAutomationClient.dll for cross-process communication and basic tree operations. Version 3.0, available from Windows 8 onward, extends these with enhanced threading support, including the ElementFromHandle method on IUIAutomation (or its .NET equivalent AutomationElement.FromHandle), which safely retrieves elements from window handles in multi-threaded scenarios without risking apartment model violations. Error handling in these APIs uses HRESULT codes; for instance, UIA_E_NOTSUPPORTED (0x80040204) indicates when a requested property or pattern is unavailable from the provider, while UIA_E_ELEMENTNOTAVAILABLE (0x80040201) signals attempts to access invalidated elements.

Core UI Model

Automation Element Tree

The Microsoft UI Automation (UIA) framework represents the of applications through a hierarchical structure known as the Automation Element Tree, which provides a programmatic view of the and all accessible UI elements. At the root of this tree is the desktop element, an instance of the AutomationElement class (or IUIAutomationElement interface in ), serving as the top-level container. Its immediate children include top-level windows of running applications, along with their contained UI components such as menus, buttons, and other controls, enabling clients to traverse the entire UI landscape from a single entry point. The supports multiple views to cater to different client needs, filtering elements based on their relevance and . The Control View encompasses all interactive and structural elements, such as toolbars and status bars, where elements have the IsControlElement property set to true; it is accessed via the ControlViewWalker and represents a logical subset of the full structure for tasks. The Content View is a further refinement, including only elements that convey meaningful information to users, like the selected value in a , by requiring both IsControlElement and IsContentElement to be true; this view uses the ContentViewWalker to focus on substantive content while excluding decorative items. In contrast, the Raw View provides an unfiltered representation of the native structure, differing by (e.g., WPF versus Win32), and is obtained through the RawViewWalker for low-level provider access without semantic filtering. Navigation within the is facilitated by methods that allow efficient traversal and querying without loading the entire into memory. The GetParent method retrieves the immediate parent of a given , supporting upward , while and relationships are managed by the UIA core, with siblings ordered to reflect visual . For broader searches, FindFirst and FindAll methods enable discovery of elements matching specified conditions, such as property values or patterns, allowing clients to locate targets dynamically across the . To optimize performance, especially in large or complex UIs, UIA employs caching mechanisms that store properties and relationships, reducing repeated queries to providers while ensuring clients can request fresh data when needed. For handling virtualized or lazily loaded UIs, such as scrollable lists where not all items are rendered simultaneously, the tree incorporates fragment roots—subtrees managed by individual providers that connect to the main tree on demand. These fragments represent portions of the UI (e.g., visible items in a list), with a dedicated root element hosted within a window, allowing seamless integration without preloading the full content. The overall tree remains dynamic, reflecting real-time changes to the UI as elements are added, removed, or repositioned, ensuring that clients always access an up-to-date representation. Offscreen elements, such as static text or potential content in virtualized containers, are included if they hold relevance in the selected view, preventing loss of accessibility for non-visible but meaningful parts of the interface.

Control Types

Microsoft UI Automation employs control types as semantic categories to classify UI elements, enabling clients to identify their roles and anticipate behaviors without relying on visual cues. These types provide a standardized for describing common interface components across applications, facilitating tools, automated testing, and . By assigning a control type to each element in the automation tree, providers ensure that clients can query and interact with the UI in a predictable manner. The framework defines a set of standard control types that correspond to prevalent UI elements, each associated with specific identifiers for programmatic reference. These include , , ComboBox, , , , ListItem, , ProgressBar, , Slider, Spinner, SplitButton, StatusBar, , TabItem, , Text, Thumb, TitleBar, ToolBar, ToolTip, , TreeItem, and Window. For instance, a is classified as , while a hierarchical list is designated as . Providers must assign the ControlType property to match the element's visual and functional role, using predefined constants such as UIA_ButtonControlTypeId = 50000 for buttons. This assignment is mandatory for elements that satisfy the conditions outlined for each type, ensuring consistency in the automation element tree. Control types remain framework-agnostic, allowing them to apply uniformly across Windows-based applications regardless of the underlying UI like Win32 or WPF. Localization of control type names is handled through the LocalizedControlTypeProperty, which provides a human-readable in the user's —such as "button" in English or its equivalent in other locales—while the Name supplies the element-specific accessible name. This separation ensures that the core type identifier remains constant, but its presentation adapts to cultural contexts. For scenarios where an element does not fit standard types, extensibility is supported via the UIA_CustomControlTypeId (50025), permitting providers to define bespoke classifications with accompanying localized descriptions. However, this is discouraged for conventional UIs to maintain and adherence to established patterns. In practice, control types are integral to querying the UI tree, as demonstrated by conditions like new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Button) in .NET clients, which filter elements by type for targeted and .

Properties

Microsoft UI Automation exposes a set of properties for each automation element, which represent static and dynamic attributes of UI components, enabling clients such as assistive technologies and testing tools to query without direct interaction. These properties are read-only and supplied by providers on demand, categorized into automation element properties (applicable to all elements) and control pattern properties (specific to patterns like ValuePattern). Providers compute values dynamically when requested via methods like GetCurrentPropertyValue, ensuring efficiency by avoiding unnecessary overhead. Core properties provide fundamental identification and positioning information for UI elements. The Name property delivers a localized, human-readable label for the element, such as "OK Button" for a button control, essential for accessibility tools to convey purpose to users. The AutomationId property offers a developer-assigned within the element tree, facilitating reliable element location in automated scripts. The ClassName property exposes the underlying window class name, like "Button" for standard controls, aiding in low-level identification. The ControlType property specifies the semantic type of the element, such as button or edit, linking to predefined control types for categorization (detailed in the Control Types section). Finally, the BoundingRectangle property returns the screen coordinates and dimensions of the element as a , useful for spatial queries and visual focus. State properties indicate the current condition and accessibility status of elements, helping clients determine interactability. The IsEnabled property is a value signaling whether the element can respond to user input, typically false for disabled controls. IsKeyboardFocusable reveals if the element can receive focus, crucial for in keyboard-only scenarios. HasKeyboardFocus confirms if the element currently holds focus. The IsPassword property, also , marks elements that mask input like password fields to protect sensitive data. IsOffscreen indicates if the element lies outside the visible screen area, preventing unnecessary processing of hidden UI. Value properties supply content or supplementary details, often tied to specific control patterns. For edit controls supporting the ValuePattern, the CurrentValue property retrieves the editable string content, enabling read access to text fields. The HelpText property provides descriptive tooltip-like text to explain the element's function, enhancing user understanding. AcceleratorKey exposes any associated , such as "Alt+O" for quick access. All properties are identified by integer constants, known as Property IDs, such as UIA_NamePropertyId (30005) for the Name property, allowing programmatic reference across platforms. Clients retrieve these using GetCurrentPropertyValue, which returns a structure containing the current value, or GetCachedPropertyValue for previously stored data. For unsupported properties, providers return defaults like empty strings or false booleans. To optimize tree navigation, clients employ PropertyCondition objects, which filter s based on property values (e.g., only enabled buttons), reducing query overhead. Caching mechanisms allow clients to request and store property sets during retrieval, with providers dynamic values only upon explicit demand to balance performance and accuracy.

Interaction Mechanisms

Control Patterns

Control patterns in Microsoft UI Automation represent standardized interfaces that expose the behavioral functionality of UI elements, allowing clients such as assistive technologies or automation scripts to interact with controls in a consistent manner. These patterns categorize common actions and states, enabling programmatic manipulation without relying on specific control implementations. For instance, a control pattern might allow invoking an action on a button or toggling the state of a checkbox, promoting interoperability across diverse UI frameworks. Providers implement control patterns through dedicated interfaces, such as IInvokeProvider for action-based behaviors, which the UI Automation core then exposes to clients via corresponding client-side interfaces like IUIAutomationInvokePattern. UI elements support zero or more patterns depending on their control type and functionality; for example, a button typically supports the Invoke pattern, while supports the Selection pattern. Clients query supported patterns on an element using the GetCurrentPattern method, which returns the appropriate pattern interface if available. Availability of control patterns can be initially checked via element properties. Common control patterns include the InvokePattern, which enables firing a single action on controls like buttons or items by calling the Invoke . The SelectionPattern allows managing selections within containers such as lists or combo boxes, providing methods to retrieve selected items or select/deselect them. The ExpandCollapsePattern supports hierarchical controls like tree views or , with states indicating whether the element is collapsed, expanded, or partially expanded, and methods to toggle these states. The TogglePattern handles binary or tri-state toggles for elements like checkboxes, cycling through states (on, off, indeterminate) via the Toggle . Value-oriented patterns encompass the ValuePattern, which permits reading and writing textual or numeric s in single-line edit controls or pickers, including properties for , isReadOnly, and maxLength. The RangeValuePattern applies to controls with bounded s, such as sliders or bars, offering properties like minimum, maximum, current , and isReadOnly, along with methods to set the within the . Item-specific patterns include the SelectionItemPattern, used for individual items in selection containers like list items, supporting selection, addition to selection, and removal from selection. The GridItemPattern facilitates navigation in tabular structures, providing details on a cell's row, column, row span, and column span relative to the grid. While standard patterns cover most scenarios, UI Automation allows extension through custom control patterns for specialized behaviors not addressed by built-in ones, implemented via unique GUIDs and remote operation APIs like those in the UI Automation extensibility model; however, such custom patterns are rare and typically reserved for advanced applications like integrations.

Events

Microsoft UI Automation (UIA) provides a mechanism for notifying client applications, such as assistive technologies and testing tools, about changes in the , including property modifications, structural alterations, and focus shifts. This enables efficient, updates without the need for constant polling, improving and performance. Events are categorized into core types and pattern-specific notifications, allowing clients to subscribe selectively to relevant changes. Core event types include the PropertyChanged event, which signals updates to an automation element's properties, such as a change in the Name property or a toggle control's state. The StructureChanged event indicates modifications to the UI Automation element tree, like the addition or removal of elements. The AutomationFocusChanged event is a global notification fired whenever the input focus moves to a different element or a window is closed. These events help clients maintain synchronization with dynamic UI states. Pattern events are associated with specific control patterns and notify clients of actions completed through those patterns. For instance, the Invoke_InvokedEvent is raised after an invoke action, such as a button being pressed. Similarly, the SelectionItem_ElementSelectedEvent occurs when an item is selected in a selection container, triggered by methods like Select or AddToSelection. These events ensure that clients can respond to user interactions without direct intervention. Clients register for events using the AddAutomationEventHandler method on the IUIAutomation , specifying the event identifier, target , (such as the itself, its descendants in the , or a broader context like a dialog), and a callback handler. The handler receives an AutomationEventArgs object containing details like the event ID, source , and runtime ID for identification. To prevent resource leaks, clients must remove handlers via RemoveAutomationEventHandler or RemoveAllEventHandlers when no longer needed. This scoped registration allows for targeted listening, reducing overhead in large applications. Providers raise events by calling the RaiseAutomationEvent method on the element, passing the event ID and relevant arguments; this notifies all subscribed clients efficiently. To avoid performance issues from event floods, providers implement selective firing, raising events only for meaningful changes—such as actual property value updates rather than redundant notifications—and only if at least one client is subscribed. This design contrasts with legacy systems by minimizing unnecessary broadcasts. For compatibility with legacy applications, UIA includes a WinEvents bridge that translates traditional Win32 events into the UIA event format, enabling older assistive technologies to integrate without full rewrites. This bridge ensures while leveraging UIA's structured notifications for modern scenarios.

Specialized Features

Text and Document Patterns

The TextPattern in Microsoft UI Automation provides a standardized for accessing and manipulating textual content within UI elements, enabling assistive technologies and automation clients to retrieve text, its formatting, and structural spans without direct with the underlying . It is primarily implemented by providers for controls such as , Text, and types, where the pattern exposes a read-only model of the text . Key methods include GetText(-1) to retrieve the entire content of the document as a string, DocumentRange to obtain a TextPatternRange spanning the full text, and RangeFromPoint to create a range from screen coordinates for precise text selection. Additionally, GetVisibleRanges returns an array of disjoint ranges representing visible portions of the text, useful for handling scrolled or partially obscured content in applications like word processors. Text attributes allow clients to query formatting details applied to specific ranges via the GetAttributeValue method on TextPatternRange objects, supporting conceptual understanding of style variations across the document. Relevant attributes include Bold and Italic for style emphasis, FontName and FontSize for typographic specifications, and ForegroundColor for visual rendering, all retrievable as variant values that may indicate mixed attributes within a range. These attributes are essential for screen readers to convey emphasis or visual cues, such as rendering "important" text in bold with a specific font size. For structured documents, TextPattern supports the control type by requiring the pattern's to expose multi-page or hierarchical text, often in conjunction with ScrollProvider for navigation. The ITextRangeProvider interface, underlying TextPatternRange, enables range manipulation through methods like Move for unit-based traversal (e.g., by or line) and FindText for substrings within spans. Hyperlinks are handled as embedded child elements, accessible via RangeFromChild to retrieve the associated text span, while are exposed through the OutlineStyles attribute, which returns values like None, or OutlineNumber1 to indicate heading levels in documents. Introduced in , TextPattern2 extends the base pattern with methods like GetCaretRange for cursor positioning and RangeFromAnnotation for linking text to , enhancing document for complex formats. Providers typically implement these patterns for rich edit controls, such as those in or Notepad, but the model excludes non-text elements like images, which are treated as separate AutomationElements rather than text ranges. Common use cases include screen readers extracting paragraph-level content for audio output and scripts querying visible text spans to verify UI state, though modifications require alternative patterns like ValuePattern or simulated input. Microsoft UI Automation provides the CustomNavigation control pattern to enable programmatic traversal of user interface elements in non-hierarchical or non-tree structures, such as lists, headings, or data items, without relying solely on the containing control's tree. This pattern supports methods like Navigate, which allows clients to move through elements using directions such as FirstChild, LastChild, NextSibling, PreviousSibling, Parent, and FirstSibling (or LastSibling), facilitating efficient navigation in flat or custom-ordered UIs. It requires properties like Level, PositionInSet, and SizeOfSet to indicate hierarchical depth and position within a set, but does not support active manipulation of the structure. The Annotation control pattern exposes supplementary information in documents, such as comments, highlights, or spelling errors, by associating annotations with target UI elements. Through the GetTarget method, clients can retrieve the annotated element, while properties like AnnotationTypeId identify the type—such as UIA_CommentAnnotationTypeId for comments or UIA_HighlightedAnnotationTypeId for highlights—and optional attributes like Author and DateTime provide additional context. Annotations can be simple (using IValueProvider for text) or rich (using ITextProvider for formatted content), and are often implemented on invisible elements to avoid cluttering the UI tree. For visual styling relevant to accessibility, the Styles control pattern retrieves attributes of UI elements, particularly in or drawing contexts, including heading levels and color properties. Key properties include StyleId for predefined styles (e.g., StyleId_Heading1 for level 1 headings), FillColor and OutlineColor for background and border colors, and ExtendedProperties for custom attributes like border thickness. This pattern supports a limited set of standard style identifiers from UIAutomationClient.h, with custom styles using StyleId_Custom paired with StyleName, enabling screen readers to convey formatting for better navigation and comprehension. Tabular data in UI Automation is handled by the and control patterns, which organize child elements in a two-dimensional . The pattern, required for controls with headers, provides GetColumnHeaders and GetRowHeaders to access header collections, supporting both primary (e.g., column titles) and secondary headers, while relying on the concurrent pattern for cell retrieval via GetItem(row, column). In contrast, the pattern focuses on traversal without headers, exposing RowCount and ColumnCount properties along with GetItem to fetch elements at specific coordinates, ensuring even empty cells return a valid element for containing grid reference. Both patterns are optional and do not allow structural changes, emphasizing read-only access for and testing. These patterns are optional in UI Automation providers, allowing flexible implementation based on control needs, and are commonly used in applications like to support structured navigation of documents, such as jumping between headings or accessing table cells and annotations. Text range navigation, which builds on these for finer-grained textual traversal, is covered separately in the Text and Document Patterns.

Use in Automated Testing

Framework Integration

Microsoft UI Automation (UIA) integrates with through its testing frameworks, particularly via the deprecated Coded UI Tests feature, which relied on UIA APIs internally for automated UI-driven . Coded UI Tests were fully supported until Visual Studio 2019 but deprecated thereafter, with removal in Visual Studio 2026, prompting migrations to direct UIA usage within MSTest projects or alternative tools. The Microsoft.VisualStudio.TestTools.UITesting namespace, central to Coded UI, exposed UIA-based interactions, allowing developers to transition by rewriting tests to invoke UIA patterns and properties explicitly in unit test projects. Open-source tools enhance UIA's accessibility for .NET developers. FlaUI serves as a comprehensive .NET wrapper around UIA, simplifying automated testing of Windows applications including Win32, WinForms, WPF, and Store Apps by abstracting UIA2 and UIA3 libraries. Similarly, TestStack.White provides a framework for automating rich client applications across Win32, WinForms, WPF, Silverlight, and () platforms, utilizing UIA as its backend to locate and interact with controls via window messages and search criteria, though it has been deprecated and is no longer actively maintained since 2014. For hybrid desktop-web testing, UIA interoperates with Selenium through WinAppDriver, an open-source service that implements the WebDriver protocol atop UIA to enable Selenium-like of Windows applications, including UWP, WPF, WinForms, and Win32 apps, though it is no longer actively maintained since its last release in 2021. This allows unified test scripts for scenarios spanning web browsers and native desktop elements, such as invoking desktop dialogs from web-driven flows. UIA scripts integrate seamlessly into CI/CD pipelines, such as those in or Jenkins, where tests execute on self-hosted agents configured for interactive UI sessions. In Azure Pipelines, UIA-based tests run using MSTest tasks, with conditions like PropertyCondition for reliable element location amid dynamic environments; Jenkins supports similar automation via plugins executing .NET test runners on Windows nodes. A representative example of UIA integration in testing involves locating and invoking a by name:
csharp
using System.Windows.Automation;

// Assume 'root' is the AutomationElement for the application window
var condition = new PropertyCondition(AutomationElement.NameProperty, "Submit");
var element = root.FindFirst(TreeScope.Descendants, condition);
if (element != null)
{
    var invokePattern = (InvokePattern)element.GetCurrentPattern([InvokePattern](/page/pattern).Pattern);
    invokePattern.Invoke();
}
This pseudo-code demonstrates core UIA client for property-based searches and pattern invocation, applicable across integrated frameworks.

Best Practices and Tools

When implementing Microsoft UI Automation (UIA) for testing, developers should prioritize the content view of the UIA tree to perform efficient queries by filtering to logical UI elements that convey essential information, excluding decorative or layout components. This approach reduces traversal overhead compared to the raw or control views, enabling faster navigation in complex applications. Additionally, asynchronous events should be handled with appropriate timeouts to account for delays in event delivery, ensuring reliable synchronization without indefinite blocking. To enhance robustness, avoid hard-coding AutomationIds in element identification, as they may change across builds or localizations; instead, use flexible conditions based on stable properties like Name or ClassName for more maintainable selectors. Common pitfalls include threading mismatches, where operations on UI elements from the wrong thread result in errors such as E_UIA_WRONG_THREAD, often due to COM apartment model violations in multi-threaded clients. Another issue arises from over-reliance on bounding rectangles for element interaction in dynamic UIs, as these rectangles may encompass non-clickable areas or shift unpredictably during animations, leading to inaccurate hit-testing or positioning. For performance optimization, cache UI elements and their properties/patterns to minimize repeated server queries, and subscribe to relevant events rather than polling for changes, which conserves resources and improves responsiveness in automated scenarios. Key tools for UIA testing include UI Automation Verify (UIA Verify), a framework supporting both manual and automated compliance testing of control implementations through its Visual UIA Verify GUI for spot checks and integration with test libraries for scripted validation. Inspect.exe serves as a debugging utility to inspect the UIA tree, revealing element exposure, properties, and patterns for troubleshooting provider issues. In modern contexts, WinUI 3 applications may require custom providers via AutomationPeers to fully expose non-standard controls to UIA clients, ensuring compatibility in testing frameworks. For isolated testing, virtualized environments like Windows Sandbox provide a disposable instance suitable for running UIA-based without risking the host system.

Platform Support and Availability

Windows Operating System Compatibility

Microsoft UI Automation (UIA) provides programmatic access to user interfaces across various Windows operating systems, with support beginning from older versions and evolving with each release. Basic functionality is available on 3 and 2, but requires the installation of Microsoft .NET Framework 3.0 to enable core features such as control patterns and events. Full UIA capabilities, including comprehensive provider support for assistive technologies and automated testing, are introduced in and later versions, where it is natively integrated without additional framework dependencies. In , , and , UIA 3.0 serves as the standard implementation, offering robust support for Win32 and WPF applications with improved event handling and navigation patterns. and subsequent versions in this range add enhanced handling for touch-based interactions, allowing UIA clients to access touch-enabled controls through standard patterns like Invoke and Selection. These operating systems ensure backward compatibility for legacy applications while supporting modern UI elements. Windows 10 (released in 2015, with the final version 22H2 in 2022 and support ending October 14, 2025), delivers complete UIA support for both (UWP) and traditional Win32 applications, enabling seamless interoperability across desktop and mobile scenarios. Note that Windows 10 reached end of support on October 14, 2025, after which no further security or feature updates are provided. Starting with version 1809, enhancements improve in high contrast themes, providing better exposure of visual states and color adjustments via UIA properties. , released in 2021, builds on this with native integration for WinUI 3 controls, including support for advanced visual effects such as and backdrops, which are exposed through UIA for assistive tools. UIA is included by default in and newer operating systems, requiring no separate installation for core functionality. On down-level systems like , .NET Framework 3.0 must be installed separately using the .NET Framework 3.0 installer. Note that while .NET-based UIA classes remain available, recommends transitioning to Win32 APIs (via UIAutomationClient.dll) for new applications to ensure long-term compatibility, especially post-.NET 5.

Cross-Framework Interoperability

Microsoft UI Automation (UIA) facilitates interoperability across diverse UI frameworks on Windows by providing standardized programmatic access to elements, enabling assistive technologies and tools to interact uniformly regardless of the underlying technology. For legacy frameworks like Win32 and (WinForms), UIA relies on client-side proxy objects implemented in Oleacc.dll, which bridge Microsoft Active Accessibility (MSAA) implementations to the UIA tree, allowing older controls to expose properties, patterns, and events without native modifications. These proxies dynamically generate UIA elements from MSAA accessible objects, ensuring for applications built with these frameworks. In contrast, Windows Presentation Foundation (WPF) offers native UIA provider support directly integrated into its core assemblies, particularly PresentationCore.dll, which handles the mapping of XAML-defined UI elements to UIA automation elements. This built-in implementation allows WPF controls to inherently support UIA patterns such as Invoke, Selection, and , with XAML bindings automatically propagating changes to the accessibility tree for real-time updates. Developers can extend this support for custom WPF controls by overriding AutomationPeer methods to customize exposure. For (UWP) and WinUI applications, UIA interoperability is achieved through the AutomationPeer framework in the Windows.UI.Xaml.Automation.Peers (for UWP) and Microsoft.UI.Xaml.Automation.Peers (for WinUI) namespaces, which serve as adapters to expose XAML-based UI elements to the UIA core. These peers implement core UIA interfaces, enabling peer-based exposure of control properties, patterns, and events, such as TextPattern for text elements or ExpandCollapse for hierarchical controls. Custom controls in UWP or WinUI can derive from base AutomationPeer classes to provide tailored automation support, ensuring seamless integration with UIA clients. Web content interoperability in UIA is supported through providers that bridge documents to the UIA tree, with the legacy MSHTML provider handling embedded controls by mapping DOM elements to UIA equivalents via MSAA proxies. In , modern and attributes are exposed natively to UIA, allowing the browser's rendering engine to generate an accessible tree that assistive technologies can traverse, including support for dynamic content updates. Beyond Windows-native frameworks, UIA's cross-platform capabilities are limited, with partial support available through ports like Mono and .NET Core on and macOS, though these primarily enable running Windows applications via Wine rather than native UIA implementations. Electron-based applications on Windows can map their accessibility APIs to UIA when enabled, allowing the renderer to expose web-like elements to the UIA tree for automation and assistive access. However, UIA lacks native support for or ; hybrid or cross-platform testing requires bridges like , which translates UIA commands on Windows to platform-specific automation frameworks such as UIAutomator for and XCUITest for .

Comparison with Microsoft Active Accessibility

Microsoft UI Automation (UIA) and Microsoft Active Accessibility (MSAA) are both accessibility frameworks provided by Microsoft for enabling assistive technologies and automated UI testing on Windows, but they differ significantly in design and capabilities. MSAA, introduced in 1997 as an add-on for , relies on a hierarchical tree of accessible objects accessed via the COM-based IAccessible interface, where occurs through parent-child relationships and properties like accRole define object types. In contrast, UIA, introduced in 2006 with .NET Framework 3.0, employs a more extensible hierarchical tree of automation elements, featuring a unified model via the IUIAutomation interface and support for filtered views (control, content, and raw) to simplify traversal. This tree-based architecture in UIA allows for reparenting and repositioning of elements, providing greater flexibility in representing complex UIs compared to MSAA's more rigid structure. Regarding exposure of UI information, MSAA is limited to a fixed set of approximately 71 predefined roles (e.g., ROLE_SYSTEM_BUTTON for push buttons), basic states via accState, and a smaller number of properties, without native support for advanced behaviors like text manipulation. UIA expands this with 39 control types (e.g., ButtonControlTypeId), over 100 properties identified by GUIDs, and 33 control patterns (such as InvokePattern for actions or TextPattern for rich text handling), enabling more precise representation of UI functionality. Events in MSAA are handled through WinEvents with around 30 constants, requiring global hooks for notification, while UIA offers over 20 event identifiers for targeted subscriptions, reducing overhead and improving reliability for changes like structure modifications or property updates. These enhancements in UIA allow for richer interactions, such as dynamic content exposure, which MSAA cannot fully support due to its legacy constraints. Performance differences stem from their querying mechanisms: MSAA necessitates individual per-property calls across process boundaries, often leading to inefficiency and the need for in-process servers or hooks, especially for out-of-process clients. UIA addresses this through built-in caching, where clients can request multiple properties and patterns in a single cross-process call via cache requests, combined with event-driven updates to minimize repeated queries. This makes UIA more suitable for high-volume automation scenarios, such as screen readers or testing tools, by reducing latency and resource usage compared to MSAA's synchronous, call-heavy approach. For migration between the two, provides interoperability bridges to facilitate coexistence without full rewrites. The MSAA-to-UIA allows UIA clients to access MSAA servers by converting IAccessible data into UIA elements, while the UIA-to-MSAA Bridge (via IUIAutomationLegacyIAccessiblePattern) enables MSAA clients to interact with UIA providers, mapping properties, patterns, and events accordingly. Tools like AccEvent support testing for both frameworks by monitoring events from MSAA WinEvents and UIA subscriptions, helping developers verify compatibility during transitions. Although full fidelity is not always possible due to MSAA's limited exposure, these bridges ensure for mixed environments. In terms of usage guidance, MSAA remains relevant for legacy applications, such as those built for older Windows versions or specific controls like Internet Explorer 6, where direct MSAA implementation is embedded. UIA is recommended for all new development starting from Windows Vista onward, particularly for modern frameworks like WPF and Win32 apps requiring advanced automation. Windows operating systems support both APIs simultaneously, with UIA as the preferred standard for assistive technologies and testing since its introduction, promoting a gradual shift while maintaining support for existing MSAA-based solutions.

Integration with Other Standards

Microsoft UI Automation (UIA) facilitates interoperability with the IAccessible2 (IA2) accessibility API, a standard primarily used in and environments, through runtime bridges that enable element lookup and conversion between the two frameworks. In Chromium-based browsers, a two-way bridge allows conversion of IA2 elements to UIA elements using unique IDs and custom properties, supporting cross-tool for screen readers like NVDA that leverage both APIs for enhanced compatibility in web and desktop applications. For web content, UIA's HTML provider integrates with Accessible Rich Internet Applications () by mapping W3C ARIA roles and properties to UIA control types and attributes, preserving semantic information for assistive technologies. For instance, an ARIA button role is exposed as a UIA Button control type with the original AriaRole property set to button, while a grid role maps to a DataGrid control type; this ensures consistent across dynamic web UIs embedded in Windows applications. In cross-platform development, UIA bridges to other platform-specific accessibility APIs via frameworks like .NET MAUI, where Windows implementations use UIA for programmatic access, corresponding to macOS for screen reading and navigation, and Android for gesture-based interaction in applications. This mapping allows developers to maintain consistent behaviors across ecosystems without platform-specific rewrites. UIA aligns with (WCAG) 2.1 by providing programmatic verification of UI elements, enabling automated checks for perceivable, operable, understandable, and robust content through properties and patterns that support success criteria like 1.3.1 (Info and Relationships). It interoperates with testing frameworks such as via the Windows Application Driver (WinAppDriver), which leverages UIA to automate desktop UIs in mobile-desktop hybrid testing scenarios, and complements image-based tools like Sikuli for broader coverage. Microsoft has contributed to open standards by providing mappings for the W3C Digital Publishing Accessibility API (DPUB-), an extension of for long-form documents, to expose roles via UIA, including support through text patterns for structured content like documents and articles. These contributions, shared with the W3C , enhance UIA's in digital publishing accessibility, with implementation status under consideration in browsers like . As of (released in 2021), UIA continues to receive enhancements for modern UI frameworks like WinUI, improving integration with evolving accessibility standards. Despite these integrations, challenges persist with incomplete mappings for custom controls, where UIA properties may not fully align with external standards, potentially leading to gaps in support; developers are recommended to implement dual support for UIA and legacy APIs like MSAA to ensure robustness.

References

  1. [1]
    UI Automation Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Microsoft UI Automation is an accessibility framework for Windows. It provides programmatic access to most UI elements on the desktop.
  2. [2]
    UI Automation Overview - .NET Framework - Microsoft Learn
    Sep 15, 2021 · UI Automation is the new accessibility framework for Microsoft Windows, available on all operating systems that support Windows Presentation Foundation (WPF).
  3. [3]
    Microsoft Active Accessibility and UI Automation Compared
    Jul 14, 2025 · This topic provides summarizes the main differences between Microsoft Active Accessibility and UI Automation.Basic Design Principles · Choosing Microsoft Active... · New Applications And...
  4. [4]
    UI Automation - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Microsoft UI Automation is an accessibility framework that enables Windows applications to provide and consume programmatic information about user interfaces ( ...Where Applicable · Developer Audience
  5. [5]
    Microsoft Active Accessibility - Win32 apps
    Jul 14, 2025 · Microsoft Active Accessibility is also supported on Windows NT 4.0 with Service Pack 6 (SP6) and later, and Windows 98.
  6. [6]
    UI Automation and Active Accessibility - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Microsoft UI Automation is the new accessibility model for Windows and is intended to address the needs of assistive technology products and automated testing ...Roles And Control Types · States And Properties · Events
  7. [7]
    UI Automation and Microsoft Active Accessibility - .NET Framework
    Sep 15, 2021 · It is actually impossible to properly implement Active Accessibility for a rebar control. UI Automation enables reparenting and repositioning, ...Roles And Control Types · States And Properties · Events
  8. [8]
    Accessible Windows apps - Win32 - Microsoft Learn
    Jul 14, 2025 · MSAA is a legacy technology introduced with Windows 95, while UI Automation is a newer, more capable technology that addresses the limitations ...Resources · Accessibility And Automation... · Develop Assistive Technology...
  9. [9]
    Avalon, Automation and Accessibility - Scott Hanselman's Blog
    Oct 31, 2003 · This new UI Automation Framework will surely make testing easier, but it also opens the door to completely new paradigms for blind or “ ...Missing: WPF early development
  10. [10]
    Windows Automation API 3.0 Overview - CODE Magazine
    Oct 28, 2008 · The legacy API, Microsoft Active Accessibility, was introduced to Windows 95 as a platform add-on in 1996. The new API is a Windows ...
  11. [11]
    Microsoft .NET Framework 3.0 Service Pack 1
    Jul 15, 2024 · Microsoft .NET Framework 3.0 Service Pack 1 provides cumulative roll-up updates for customer reported issues found after the release of Microsoft .NET ...Missing: Automation | Show results with:Automation
  12. [12]
    UI Tests for Desktop and UWP Apps - Microsoft Learn
    Oct 4, 2018 · WinAppDriver is a UI automation service for Windows 10. You can use the UI Recorder to track keyboard and mouse interactions and then view ...
  13. [13]
    Microsoft.UI.Xaml.Automation.Peers Namespace - WinUI
    Defines support types for the Microsoft UI Automation infrastructure. Note This namespace requires the Microsoft.UI.Xaml.Controls NuGet package, a part of ...
  14. [14]
    UI Automation - Mono Project
    Nov 24, 2008 · The User Interface Automation (UIA) specification is an advanced accessibility framework, developed by Microsoft, and released to the community.Missing: port | Show results with:port
  15. [15]
    Mono goes Accessible! - Miguel de Icaza - tirania.org
    Jan 5, 2009 · UI Automation also allows automated test scripts to interact with the UI. Mono's Accessibility Framework is an implementation of UI Automation.Missing: port | Show results with:port
  16. [16]
    UI Automation Fundamentals - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Microsoft UI Automation enables assistive technology applications and automated testing tools to interact with the UI controls of other applications.
  17. [17]
    UI Automation Clients Overview - Win32 apps | Microsoft Learn
    Jul 14, 2025 · A UI Automation client is any application that uses the UI Automation API to access information about UI elements, or to control applications.Missing: server | Show results with:server
  18. [18]
    UI Automation Providers Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · This topic provides an overview of how control developers implement UI Automation providers.Types Of Providers · Ui Automation Provider... · ElementsMissing: history | Show results with:history
  19. [19]
    Interface Marshaling - Win32 apps - Microsoft Learn
    Aug 21, 2020 · This is the easiest way to implement marshaling support. All you have to do is generate a type library and register it. Your interfaces must be ...
  20. [20]
    UI Automation Tree Overview - Win32 apps | Microsoft Learn
    Jul 14, 2025 · The UI Automation tree is a root element that represents the Windows desktop window ("the desktop") and whose child elements represent application windows.Missing: history | Show results with:history
  21. [21]
    Understanding Threading Issues - Win32 apps | Microsoft Learn
    Jul 14, 2025 · This topic describes common threading scenarios for Microsoft UI Automation client implementations and explains how to avoid problems that can occur if a ...UI Automation and the UI Thread · Threading Model for Event...
  22. [22]
    Threading Model - WPF - Microsoft Learn
    May 7, 2025 · WPF applications start with two threads: one for handling rendering and another for managing the UI. The rendering thread effectively runs hidden in the ...Missing: Automation | Show results with:Automation
  23. [23]
    UI Automation Security Overview - .NET Framework - Microsoft Learn
    Sep 15, 2021 · This overview describes the security model for Microsoft UI Automation in Windows Vista. User Account Control Security is a major focus of Windows Vista.
  24. [24]
    Windows.UI.Xaml.Automation.Provider Namespace - Microsoft Learn
    Exposes a method to support Microsoft UI Automation access to controls that initiate or perform a single, unambiguous action and do not maintain state when ...
  25. [25]
    Interfaces for Providers - Win32 apps - Microsoft Learn
    Jul 14, 2025 · This section describes the basic interfaces implemented by UI Automation providers for Microsoft Win32 applications.
  26. [26]
    Implement a Server-Side UI Automation Provider - Win32 apps
    Jul 14, 2025 · To provide basic functionality, every UI Automation provider must implement at least the IRawElementProviderSimple interface.Provider Interfaces · Required Functionality For... · Events From Providers
  27. [27]
    IUIAutomation (uiautomationclient.h) - Win32 apps | Microsoft Learn
    Oct 4, 2021 · Exposes methods that enable Microsoft UI Automation client applications to discover, access, and filter UI Automation elements.Missing: background UIA 3.0
  28. [28]
  29. [29]
    Using UI Automation for Automated Testing - .NET Framework
    Sep 15, 2021 · This overview describes how Microsoft UI Automation can be useful as a framework for programmatic access in automated testing scenarios.
  30. [30]
    IUIAutomation::ElementFromHandle method (uiautomationclient.h)
    Feb 22, 2024 · Retrieves a UI Automation element for the specified window. Syntax. C++. Copy. HRESULT ElementFromHandle( [in] UIA_HWND hwnd, [out, retval] ...
  31. [31]
    AutomationElement.FromHandle(IntPtr) Method - Microsoft Learn
    Retrieves a new AutomationElement object for the user interface (UI) item referenced by the specified window handle.
  32. [32]
    Error Codes (UIAutomationCoreApi.h) - Win32 apps | Microsoft Learn
    Jul 14, 2025 · In this article ; UIA_E_INVALIDOPERATION; 0x80131509. Indicates that the method attempted an operation that was not valid.Missing: HRESULT | Show results with:HRESULT
  33. [33]
    UI Automation Tree Overview - .NET Framework - Microsoft Learn
    This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation ...
  34. [34]
    UI Automation Specification - Win32 apps | Microsoft Learn
    Jul 14, 2025 · This topic provides an overview of the Microsoft UI Automation Specification, which forms the basis of the Windows implementation of UI ...
  35. [35]
    UI Automation Control Types Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · UI Automation control types are identifiers for UI elements, like a button or combo box. Examples include Button, Calendar, and ComboBox.
  36. [36]
    Control Type Identifiers (UIAutomationClient.h) - Win32 apps
    Jul 14, 2025 · This topic describes the named constants used to identify Microsoft UI Automation control types.
  37. [37]
    UI Automation Properties Overview - .NET Framework
    Sep 15, 2021 · These properties enable UI Automation client applications to discover information about pieces of the user interface (UI), especially controls, including both ...<|control11|><|separator|>
  38. [38]
    UI Automation Properties Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · UI Automation exposes two different kinds of properties: automation element properties, and control pattern properties. The automation element ...
  39. [39]
    Retrieving Properties from UI Automation Elements - Win32 apps
    Jul 14, 2025 · Microsoft UI Automation properties are read-only. To set properties of a control, you must use the methods of the appropriate control pattern.
  40. [40]
    UI Automation Control Patterns Overview - Win32 apps
    Jul 14, 2025 · A control pattern is an interface implementation that exposes a particular aspect of a control's functionality to Microsoft UI Automation client applications.
  41. [41]
    Control Types and Their Supported Control Patterns - Win32 apps
    Jul 14, 2025 · This topic lists the Microsoft UI Automation control types and identifies the control patterns that each type supports.
  42. [42]
    Get Supported UI Automation Control Patterns - .NET Framework
    This topic shows how to retrieve control pattern objects from UI Automation elements. Obtain All Control Patterns
  43. [43]
    Implementing UI Automation Control Patterns - Win32 apps
    Jul 14, 2025 · This section provides detailed information about implementing the Microsoft UI Automation provider interfaces that support control patterns.
  44. [44]
    Using Custom Control Patterns - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Custom control patterns use remote operations, which are UIA client APIs, and builder APIs that wrap UIA APIs to build byte codes.Overview · Examples · Word Example
  45. [45]
    Design custom properties, events, and control patterns - Win32 apps
    Jul 14, 2025 · The design of a custom property, event, or control pattern should be useful in a wide variety of control implementations.Designing Custom Properties · Designing Custom Events · Designing Custom Control...
  46. [46]
    UI Automation Events Overview - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Microsoft UI Automation event notification is a key feature for assistive technologies, such as screen readers and screen magnifiers.
  47. [47]
    Event Identifiers (UIAutomationClient.h) - Win32 apps | Microsoft Learn
    Jul 14, 2025 · This topic describes the named constants used to identify Microsoft UI Automation events.
  48. [48]
    Subscribing to UI Automation Events - Win32 apps | Microsoft Learn
    Jul 14, 2025 · The best practice is to follow the Component Object Model (COM) standard and avoid destroying the event handler object until its reference count ...
  49. [49]
    UI Automation TextPattern Overview - .NET Framework
    Sep 15, 2021 · This overview describes how to use Microsoft UI Automation to expose the textual content, including format and style attributes, of text controls in UI ...Control Types · Textpattern Provider Apis · Security
  50. [50]
    TextPattern Class (System.Windows.Automation) | Microsoft Learn
    The TextPattern class may not provide for text features that exist only in a particular UI Automation provider.
  51. [51]
    UI Automation Text Attributes - Win32 apps | Microsoft Learn
    Jul 14, 2025 · This topic describes how Microsoft UI Automation exposes the format and style properties (text attributes) of textual content, and provides a list of supported ...Font Attributes · Page Margin Attributes · Interaction And Selection...Missing: hyperlinks outlines
  52. [52]
    Text Attribute Identifiers (UIAutomationClient.h) - Win32 apps
    Jul 14, 2025 · This topic describes the named constants used to identify text attributes of a Microsoft UI Automation text range.Missing: hyperlinks | Show results with:hyperlinks
  53. [53]
    UI Automation Support for the Document Control Type
    Sep 15, 2021 · The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Document control type.
  54. [54]
    TextPattern and Embedded Objects Overview - .NET Framework
    Sep 15, 2021 · This overview describes how Microsoft UI Automation exposes embedded objects, or child elements, within a text document or container.Common Scenarios · Hyperlink · Image
  55. [55]
    TextPattern.OutlineStylesAttribute Field (System.Windows.Automation)
    ### Summary of TextPattern.OutlineStylesAttribute
  56. [56]
    IUIAutomationTextPattern2 (uiautomationclient.h) - Win32 apps
    Feb 22, 2024 · Retrieves a text range containing the text that is the target of the annotation associated with the specified annotation element. Requirements.Inheritance · Methods
  57. [57]
    CustomNavigation Control Pattern - Win32 apps - Microsoft Learn
    Jul 14, 2025 · The CustomNavigation control pattern is used to enable custom navigation ... UI Automation Control Patterns Overview. Feedback. Was this page ...
  58. [58]
    Annotation Control Pattern - Win32 apps - Microsoft Learn
    Jul 14, 2025 · The UIAutomationClient.h header file defines a set of named constant values that identify the types of annotations that Microsoft UI Automation ...
  59. [59]
    Styles Control Pattern - Win32 apps - Microsoft Learn
    Jul 14, 2025 · Applications can use a wide variety of styles to describe objects, but UI Automation represents only the most common ones. To represent ...
  60. [60]
    Table Control Pattern - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Conceptual. Control Types and Their Supported Control Patterns · TableItem Control Pattern · UI Automation Control Patterns Overview · UI ...
  61. [61]
    Grid Control Pattern - Win32 apps | Microsoft Learn
    Jul 14, 2025 · When implementing the Grid control pattern, note the following guidelines and conventions: ... UI Automation Control Patterns Overview · UI ...
  62. [62]
    UI Automation Custom Extensions in Office - Microsoft Learn
    Jun 4, 2025 · The GUIDs and types for the UI Automation custom properties, events, control patterns, and annotations provided by Word, Excel, ...
  63. [63]
    Using UI Automation for Automated Testing - Win32 apps
    Jul 14, 2025 · This overview describes how Microsoft UI Automation can be useful as a framework for programmatic access in automated testing scenarios.Ui Automation In Providers · Ui Automation In Clients · Key Properties For Test...
  64. [64]
    Automation Element Property Identifiers (UIAutomationClient.h)
    Jul 14, 2025 · Identifies the BoundingRectangle property, which specifies the coordinates of the rectangle that completely encloses the automation element. The ...Missing: bounding UIs
  65. [65]
    UI Automation Verify (UIA Verify) - Win32 apps - Microsoft Learn
    Jul 14, 2025 · UI Automation Verify (UIA Verify) is a testing framework for manual and automated testing of a control's or application's implementation of Microsoft UI ...
  66. [66]
    Accessibility tools - Inspect - Win32 apps | Microsoft Learn
    Jul 14, 2025 · Inspect (Inspect.exe) is a Windows-based tool that can select any UI element and view its accessibility data.
  67. [67]
    Windows Sandbox | Microsoft Learn
    Jan 24, 2025 · Windows Sandbox (WSB) offers a lightweight, isolated desktop environment for safely running applications. It's ideal for testing, debugging, exploring unknown ...Install Windows Sandbox · Windows Sandbox architecture
  68. [68]
    WinUI 3 - Windows apps | Microsoft Learn
    Jul 15, 2024 · WinUI 3 is the native UI platform component that ships with the Windows App SDK (completely decoupled from Windows SDKs).Create your first WinUI 3 project · Design for Windows appsMissing: Automation | Show results with:Automation
  69. [69]
    Microsoft UI Automation - .NET Framework
    Sep 15, 2021 · Note. This documentation is intended for .NET developers who want to use the managed UI Automation classes defined in the System.Windows.
  70. [70]
    Accessing Microsoft Active Accessibility Servers - Win32 apps
    Jul 14, 2025 · The Microsoft Active Accessibility to UI Automation Proxy is a software component that enables Microsoft UI Automation clients to interact ...Missing: WinForms | Show results with:WinForms
  71. [71]
    UI Automation Providers Overview - .NET Framework - Microsoft Learn
    Sep 15, 2021 · This topic provides an overview of how control developers implement UI Automation providers, particularly for controls in Windows Forms and Win32 windows.Types Of Providers · Ui Automation Provider... · Frameworks
  72. [72]
    UI Automation of a WPF Custom Control - Microsoft Learn
    This topic describes how to implement a server-side UI Automation provider for a custom control that runs in a WPF application.Customizations In A Derived... · Override Getpattern · Override ``core'' MethodsMissing: Avalon early development
  73. [73]
    Server-Side UI Automation Provider Implementation - .NET Framework
    Sep 15, 2021 · This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Provider Interfaces · Property Values In Non-Wpf... · Events In Non-Wpf Providers
  74. [74]
  75. [75]
  76. [76]
    Custom automation peers - Windows apps - Microsoft Learn
    Jan 4, 2023 · Describes the concept of automation peers for Microsoft UI Automation, and how you can provide automation support for your own custom UI class.Peers, Patterns And Control... · Oncreateautomationpeer · Core Methods Of...Missing: hyperlinks outlines
  77. [77]
    ARIA and UI automation in Microsoft Edge
    Jan 24, 2022 · Learn how Microsoft Edge can recognize ARIA info, then expose it to assistive technologies that can then use Microsoft UI Automation APIs.
  78. [78]
    Home | Mono
    Cross platform, open source .NET framework. Mono is a software platform designed to allow developers to easily create cross platform applications.Download · C# Compiler · The Mono Runtime · DocumentationMissing: UI Automation macOS
  79. [79]
  80. [80]
    Getting started with UI testing .NET MAUI apps using Appium
    Jun 10, 2024 · On Windows you can only install and use the Appium drivers for Windows and Android, that means you can only test Windows and Android ...
  81. [81]
    Object Roles (Oleacc.h) - Win32 apps | Microsoft Learn
    Jul 14, 2025 · This topic describes the constant values used to describe the roles of various UI objects in an application.
  82. [82]
    Caching UI Automation Properties and Control Patterns - Win32 apps
    Jul 14, 2025 · Caching enables a client to retrieve all of the desired properties for all of the desired elements with a single method call.Missing: MSAA per- queries
  83. [83]
    Appendix G Active Accessibility Bridge to UI Automation - Win32 apps
    Jul 14, 2025 · The Active Accessibility Bridge maps UI Automation properties and events to those of Microsoft Active Accessibility. The following tables ...
  84. [84]
    Accessibility tools - AccEvent (Accessible Event Watcher)
    Jul 14, 2025 · AccEvent (Accessible Event Watcher) lets developers and testers to validate that an application's UI elements raise proper Microsoft UI Automation and ...Missing: MSAA | Show results with:MSAA
  85. [85]
    Accessibility: Towards a more inclusive web with Microsoft Edge and ...
    Sep 25, 2015 · For example, while MSAA supports only basic UI constructs, Narrator works with UIA in Microsoft Edge to express more complex roles, states, and ...<|control11|><|separator|>
  86. [86]
  87. [87]
    UI Automation for W3C Accessible Rich Internet Applications ...
    Jul 14, 2025 · W3C ARIA roles can map to Microsoft Active Accessibility roles or UI Automation control types. With UI Automation, the original W3C ARIA ...
  88. [88]
    Build accessible apps with semantic properties - .NET MAUI
    Enable TalkBack​​ However, TalkBack can typically be enabled on your Android device via the device settings: Open the Settings app. Select Accessibility > ...Missing: hybrid | Show results with:hybrid
  89. [89]
    microsoft/WinAppDriver: Windows Application Driver - GitHub
    Windows Application Driver (WinAppDriver) is a service to support Selenium-like UI Test Automation on Windows Applications.Releases · Wiki · Issues · All workflows
  90. [90]
    Digital Publishing Accessibility API Mappings 1.0: Test Results
    While Microsoft has provided the Working Group with the mappings through which Digital Publishing ARIA roles should be exposed via UIAutomation ...