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

Issue with setting UI Automation value on Excel

I have an issue with setting value in Excel with UI Automation. I can get all the cells and their information howver I am unable to set the AutomationElement by using method ValuePattern.SetValue() The code will be executed and no error will be…
Cam
  • 1
  • 1
0
votes
0 answers

Iaccessible interface , call to accChild[] does not give child element name , accChildCount returns the count properly

I have written the below functions in C# (GetObjectByName and GetAccessibleChildren) by calling oleacc.dll. I am not able to understand when there is child of child items, it is not getting their name, i get the error "entry point not found" in…
0
votes
0 answers

UIAutomation FlaUI - Detect Both Closing and Opening Windows at the Application Level

I have successfully used the solution for detecting opening windows described here: UIAutomation FlaUI - Detect opening windows on application level. However, I would also like to also detect closing window events in addition to opening window…
dcr
  • 1
0
votes
0 answers

UI Automation in UWP application for detecting controls in another application

I want to access control elements of an application using UI Automation framework. The current codebase is built is a UWP application and I want to extend this feature on it. I wrote a c++ script using UIAutomation to extract control elements.…
0
votes
1 answer

How to allow uiAccess in UWP application

I am invoking C++ UIautomation modules in my UWP application. The application is not able to extract control elements since it is not running in an elevated environment. How should I set up the manifest file or set my UWP app to be able to get…
0
votes
0 answers

How add pattern and/or property to UIAutomation (C#)

We are using Microsoft's UIAutomation stuff to implement some automated UI tests, and that's working reasonably well, but now we're running into a limitation that we can't figure out how to get around. We've subclassed TextBox to add an "IsValid"…
Betty Crokker
  • 3,001
  • 6
  • 34
  • 68
0
votes
0 answers

Getting cannot request a property or pattern that is not cached error

I'm trying to get all properties of an automation element present at specific point on desktop or which currently have mouse focus using UI Automation C# API. For this, I am using GetPhysicalCursorPos(out pt) to get the co-ordinates for selected…
0
votes
2 answers

UIAutomation FlaUI - Detect opening windows on application level

I am using FlaUI for test automation and it works fine so far. Now I am trying to detect opening windows and while plain UIAutomation offers to register an eventhandler for "AutomationElement.RootElement" I cannot find a way to translate this to…
Gope
  • 1,672
  • 1
  • 13
  • 19
0
votes
0 answers

Why does setting a PropertyChangedEventHandler on the Desktop not work when TreeScope_Children is used?

I'm working in C++ using Microsoft's UIAutomation framework. I have a need to be notified when any top-level windows on the desktop have their title changed. In my understanding, I should just be able to register a PropertyChangedEventHandler on…
DukeBrymin
  • 351
  • 3
  • 15
0
votes
1 answer

UIAutomation failing to find child nodes

Trying to automate IIS (INetMgr) trying to use UIAutomation, i'm fixing mixed results. I'm able to get some if the screen elements good fine, others, even immediate children nodes, can't get either with a Find[First|All] or try in a treewalker…
Dano
  • 112
  • 7
0
votes
1 answer

Set the checkbox state in the window in which the window title changes dynamically (UI automation > Form filling)

I'm trying to create a flow where it checks the status of the checkbox for multiple windows (i.e. Windows app which changes the title dynamically). Currently, "set checkbox state window" in power automate desktop will allow to select form app window…
0
votes
1 answer

UI Automation to navigate Microsoft Edge without going through Selenium?

I'm developing some UI Automation work for a WPF program in VB.Net and have had great success. . . until trying to automate Web Browsers. With Chrome there's --force-renderer-accessibility which was a Godsend, but it appears despite having been…
k1dfr0std
  • 379
  • 1
  • 15
0
votes
0 answers

Cast object of same type from different assemblies

I need to cast ControlType object that belongs to the struct AutomationElementInformation from Interop.UIAutomationClient.dll to UIAComWrapper.dll. Both belongs to namespace System.Windows.Automation. I tried JSON serialization/de-serialization but…
0
votes
0 answers

What is the name of the Microsoft UI Automation API tester tool that Microsoft made?

Windows has a UI Automation API, and there is a small tool written by Microsoft that allows one to test and verify that a UI automation server implementation is working correctly. Its UI resembles Regedit. I've forgotten the name of the tool. What…
Ansis Māliņš
  • 1,684
  • 15
  • 35
0
votes
0 answers

(C#) "STATE_SYSTEM_BUSY" in automationElement.Patterns.LegacyIAccessible.Pattern.State

i am programming the uiautomation, but some applications that i used to test the uiautomation, the LegacyIAccessible.State contain STATE_SYSTEM_BUSY. I had tried to wait the more than 1hour. It still on busy. Any code related solution can solve this…
khw_MY
  • 1
  • 1