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
0
votes
1 answer

Is there a way to dump the Windows UI Automation tree at a certain moment of time?

I am trying to debug some scripts (that use Windows UI Automation support to identify GUI object) that I have developed and that are failing intermittently because they cannot find certain controls in the tree. I'm using also screenshots to check…
0
votes
0 answers

Get value of ControlType.Spinner element using UIAutomation

I obtained window and the spinner object: var OrderWindow = AutomationElement.RootElement.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "*NAME*")); var numberOfXX = OrderWindow.FindFirst(TreeScope.Descendants,…
MichalH.
  • 29
  • 1
  • 5
0
votes
1 answer

How to write an out-of-process MS UI Automation client

Much of the documentation I've read regarding UIA lauds its ability to be used out-of-process with significant performance improvements over out-of-process MSAA clients, but I can't seem to drum up any documentation describing how to actually write…
Alex Broadwin
  • 1,288
  • 11
  • 23
0
votes
1 answer

UIAutomation Click button without making window take focus and GetCurrentPattern() returning unsupported pattern

I have the handle of a window and what I want to do is click it's button named "Load Settings". I have 2 problems. My first problem is when I call Invoke on a certain InvokePattern, it brings the window to focus and this is undesirable for my…
0
votes
1 answer

Subscribing to UI Automation event freezes application on window hang

I'm using AddPropertyChangedEventHandler to subscribe to a window event as per http://msdn.microsoft.com/en-us/library/ms752286(v=vs.110).aspx However, if the target window hangs or freezes (unfortunately this can happen fairly regularly), my entire…
Steve Gore
  • 356
  • 6
  • 12
0
votes
0 answers

User Interface Automation Testing using White Framework

I am trying to automate a UI written in WPF. I have a list box consisting of a button as a list item..How can i get the instance for that particular button using White Framework? Even if i try to get an instance of the list box; it shows an error…
Siddhant
  • 571
  • 1
  • 8
  • 32
0
votes
1 answer

UIA - AutomationElement doesn't return correct name when list view changes

I'm trying to read the contents of a "list view" using automation. The first time I navigate to it, I'm able to go from item to item, getting the correct text for each list item. However, when I display a different screen (which is apparently…
0
votes
1 answer

Windows UI Automation. How to automate windows explorer scroll bar?

I am using the windows UI automation framework: http://msdn.microsoft.com/en-us/library/System.Windows.Automation(v=vs.110).aspx The issue I am running into is that the UI automation framework provided by Microsoft is seemingly blind to some of…
LLL
  • 1,085
  • 8
  • 16
0
votes
1 answer

Can we "click" on edit boxes using Microsoft UIAutomation libraries

In my application, we have a webbrowserpageviewer control. when a webpage is opened, user needs to click on some of the editboxes present on the webpage. We are trying to simulate this behvior using UI Automation libraries. Am a bit new to this but…
Tejas
  • 391
  • 2
  • 7
  • 19
0
votes
1 answer

How can we check if a AutomationElement is selected c#

Is there any way to get if an AutomationElement is selected or not. I have used following code to get an AutomationElement object. System.Windows.Point point = new System.Windows.Point(Cursor.Position.X, Cursor.Position.Y); AutomationElement …
kapill
  • 189
  • 9
0
votes
1 answer

UI Automation changing property IsEnabled Property Element

We are running a custom process injection into a WPF Process, and enable named pipe between process to communicate. I want to disable the mainwindows until I complete my injection process. I am using UIAutomation Libraries to check wpf window…
0
votes
1 answer

Get a specific tab in MSIE 9

I am using Watin 2.1 to try to test file download and file open functionality for a website. This worked well in Internet Explorer 8, but since Internet Explorer 9 there is a yellow-white download bar at the bottom of the view instead of a popup…
tomsv
  • 7,207
  • 6
  • 55
  • 88
0
votes
0 answers

How to detect color change of a TSemaphor control?

I have an application A, which has a little text box, surrounded by a frame, which indicates whether the system is ready or not. The text and the frame reside inside a Delphi TSemaphor control. During initialization, the frame is yellow. When the…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
1 answer

How to improve performance of TestApi's Keyboard.Type method?

I'm using Keyboard.Type method from the TestApi project in order to enter a string into a text box. /// /// Types the specified text. /// /// /// Note that a combination of a combination of…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
2 answers

How to find whether the TextBox is readonly or not

I am developing an application to automates other applications. I want to be able to determine whether the textbox element on the "other" application is readonly or not. In case of one-line textboxes MS UI Automation framework provides ValuePattern…
haynar
  • 5,961
  • 7
  • 33
  • 53
1 2 3
21
22