Questions tagged [microsoft-ui-automation]

The Microsoft UI Automation (UIA) framework provides programmatic access to most user interface elements on Win32, WinForms, and WPF applications. It is primarily used for the purposes of automated UI testing and accessibility assistance.

The Microsoft UI Automation (UIA) framework provides programmatic access to most user interface elements on Win32, WinForms, and WPF applications. It is primarily used for the purposes of automated UI testing and accessibility assistance.

The UI Automation Framework was introduced in .NET 3.0 with two APIs. A client API which provides a means for obtaining information about UI elements and interacting with them, and a provider API which contains interfaces which developers can implement to enable interaction with non-standard UI elements in their applications.

The UIA framework exposes every UI component as an AutomationElement object. These objects comprise a tree structure wherein the Windows desktop is the root element. Navigation of this tree is primarily accomplished with the client API's TreeWalker object.

Each AutomationElement exposes a set of control patterns which define the way clients can interact them. For example, if the element defines a ValuePattern, a client can get this pattern and store it in a ValuePattern object, and use that objects getValue and setValue methods to access the UI element's value (the text in a textbox for instance).

Originally just available to managed .NET projects, the UIA 3.0 update released alongside Windows 7 introduced a native COM library which boasts improved compatibility, stability, and speed. UIA 3.0 is also available as a separate hotfix KB971513 for Vista and XP SP3.

More Information:

325 questions
2
votes
1 answer

UIAutomation - unbinding event in event handler

I am using the C wrapper of UIAutomation to listen for events. Specifically, I'm looking for a focus event. When that focus event happens, I'm simply logging to the console, and unbinding the event. Problem is - the program seems to stall/"die" on…
Jeff
  • 1,800
  • 8
  • 30
  • 54
2
votes
1 answer

ToolStripTextBox, ToolStripComboBox not automated

In UI Automation, when automating the toolstrip items we are facing an issue which is described below I am adding toolstrip items as follows this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { …
2
votes
2 answers

How to get the text value from Point using Microsoft UI Automation?

I'm looking for the ways to improve performance of finding text on focused AutomationElement (point). I already have code like this. It uses UIAComWrapper and pretty slow. public static string GetValueFromNativeElementFromPoint(Point p) { …
unickq
  • 1,497
  • 12
  • 18
2
votes
2 answers

MS UI Automation - How to get text from ControlType.text

I have a small windows application that has a series of labels on it. This application will be globalized and there is a possibility that the text on these labels might get truncated. I am trying to automate to identify truncated text on these…
Virus
  • 3,215
  • 7
  • 29
  • 46
2
votes
1 answer

Reading out Edge Browser Title & Url with System.Windows.Automation

I'm trying to read out the TITLE & URL from the Microsoft EDGE Browser. Doing this with System.Windows.Automation most preferably since the code base already uses this for other problems. Is it possible with System.Windows.Automation? How to access…
Yves Schelpe
  • 3,343
  • 4
  • 36
  • 69
2
votes
1 answer

Programatically Assigning AutomationIds to Templated Controls in WPF

I've got a control template that looks like: