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
0 answers

VBA detect download finish from Internet explorer

I'm using the code snippet from here Automate saveas dialouge for IE9 (vba) To invoke the open/save actions on the IEs download notification, with a few minor changes. Specifically I use "Open". It works fine, except I can't tell whether or not the…
0
votes
1 answer

UI Automation doesn't work in Windows Phone 8 app.

I developed an app for Windows Phone 8 some time ago. The client wants the app to be accessible for Blind users. I have given "AutomationProperties.Name" values to all the app elements, but Narrator doesn't detect the elements at all. It detects the…
0
votes
1 answer

COM UIA event called only after unregistering

I'm using the MS UIA (COM) through a C++/CLI interface, and my C# application is using that C++/CLI interface (let's call this interface/dll as uiacpp) I created the event handling mechanism in uiacpp mostly following the examples in…
AlbusMPiroglu
  • 645
  • 3
  • 13
0
votes
1 answer

UIAutomation - TransformPattern.Resize and Move makes window disappear

When I call TransformPattern.Resize or TransformPattern.Move, the window disappears. I can still interact with the window's AutomationElement, but cannot see it on screen anymore. The AutomationElement reflects the changes made as well. When I use…
M_Tee
  • 3
  • 3
0
votes
0 answers

Selecting a ListBox Item using the UI Automation Framework

I have a window that contains a listbox, My setup allows a unit test to access the listbox directly.
Johannes
  • 6,490
  • 10
  • 59
  • 108
0
votes
0 answers

UI Automation for Prism wpf project using White

I have created WPF application using Prism framework. Now I need to perform UI automation on it. I have used White UI automation framework for plain WPF application, but I am not able to write UI test in Prism using White. How to write UI test in…
Niranjan NT
  • 165
  • 1
  • 19
0
votes
2 answers

Download dialog Box IE

I have use this code Controlling IE11 "Do you want to Open/Save" dialogue window buttons in VBA But I get the error "user defined type not defined" on Dim o As IUIAutomation Someone knows how can I fix it?
Eli
  • 65
  • 6
0
votes
1 answer

WPF user control cannot be seen in inspect

Here is a question that I already has an answer. I want to mark here to help others. I have a self-defined tabcontrol. When I do the automation, the control tree of tabitem doesn't populated in inspect. Here is the code:
Newton Zou
  • 558
  • 1
  • 5
  • 20
0
votes
0 answers

Windows UI Automation AutomationEventHandler on Start menu

I am learning Windows UI Automation, I intent to Add Automation Event Handler on Start menu, But when i click the Start menu, nothing happened on Windows 10 . I try the same application on Windows 7,It works Could anyone help me. Thanks. private…
LKX
  • 16
  • 1
0
votes
1 answer

UI Automation in C# without using mouse possible

So, I am trying to use UI Automation(Specically White library) to simpulate multiple automations at the same time. I would not like my mouse to be taken over. Is there anyway to do this? Basically, I want an instance of my UI Automation to use a…
0
votes
1 answer

c# is checkbox checked in another application

I am writing an application to interface two other existing applications. I'm new to C# so this is quite the challenge for me. My current issue that I have yet to find an answer for is whether a checkbox is checked or not. I was trying to use…
NewToC
  • 1
  • 4
0
votes
0 answers

How to Capture the Click event Using UI Automation in Outlook?

I want to capture button event of outlook using UI Automation. Right now i am able to get 'Property Change Event' like whenever iam minimizing or maximizing the WINWORD window the the event is raised instead of that i want to get the event on Send…
Ravi Kanth
  • 1,182
  • 13
  • 38
0
votes
2 answers

MSAA UI Automation get_accChildCount Incorrectly Returning 0 for Infragistics UltraTree in Winforms

While working on automating an Infragistics UltraTree control in a C# Winforms application I found that the UltraTree implemented the AccessibleObject model (MSAA). I was able to successfully grab the IAccessible interface by putting the hwnd…
Chiune Sugihara
  • 1,179
  • 1
  • 7
  • 14
0
votes
1 answer

How to make sure that button has been clicked?

Is there a simple way to check if my OK button was pressed? Most of the times it is working perfectly, but 1 in 100 it fails: AutomationElement rl = SomeMethod(); if (rl.Current.Name == "OK" && rl.Current.ControlType == ControlType.Button) { …
vt100
  • 923
  • 1
  • 11
  • 21
0
votes
1 answer

Selecting drop down using UI Automation does not keep drop down expanded

I'm attempting to select a drop down menu, so that I can select a Courier Service using Microsoft UI Automation. Below is the code in which I'm using public void SelectCourierService(string courierService) { …
ChrisMcLellan
  • 613
  • 1
  • 5
  • 13