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

How to retrieve masked value of the control using Microsoft UIA

In our application we have fields like date/SSN and those contains default masked value as ‘MM/DD/YYYY’ or ‘xxx-xx-xxxx’ etc. when we focus these controls these values gets hidden and blank control gets displayed. We needed to check the default…
NewAutoUser
  • 533
  • 2
  • 10
  • 26
0
votes
2 answers

Does anyone have some links/online material explaining how coded UI test works?

We have used UI Automation for automating our application and wanted to move the scripts from UI automation to the coded UI. I need to understand how it works behind the scene. Please share any links/documents which would provide some idea about it.…
0
votes
2 answers

ValuePattern's SetValue does not work for Chrome browser's control like address edit (Exception thrown)

I am trying to use UIA to control browsers (ie, chrome, firefox) operations like nativate, go back, go forward and so on for some testing necessary. I tried to wrote some demo code, but met some problems. I got the AutomationElement for address edit…
-1
votes
1 answer

Use Windows UIAutomation to tap on WPF TextBox

My WPF Windows Desktop application is with touch support - so when I tap on TextBox the keyboard pops up. I'm trying to write a test using Windows UIAutomation for my WPF application. I want to "tap" on TextBox using UIAutomation and check if the…
-1
votes
1 answer

C# Handle UI Automation text selected event

I am trying to find information on how to code a selectedtext event handler with C# UI automation and notepad. A google search only turned up the following…
Weston Goodwin
  • 781
  • 3
  • 12
-1
votes
1 answer

Detect and restart a crashed windows app using .NET core

We have few 3rd party vendor supplied apps that crash quite often and since we don't have source code for it, we can't really fix it properly. So I have decided to create a .NET core 5 worker service that would monitor those apps and restart them as…
Ash K
  • 1,802
  • 17
  • 44
-1
votes
2 answers

Dispatcher.BeginInvoke Error in VB but not C#

Hey all I am using some UIAutomation code that was written in C#. So I converted it into VB.net so that I could integrate it into my own program I am making. The code that has the error is this line: Private Sub LogMessage(message As String) …
StealthRT
  • 10,108
  • 40
  • 183
  • 342
-1
votes
1 answer

Is there a way to access WPF control properties (specifically a button's IsDefault) if I only have an AutomationElement?

I have an AutomationElement for a particular WPF Button in an external application from the WPF application that I am try to access. Is there a way to find out the button's IsDefault property? I have tried to access the button's window's control…
M_Tee
  • 3
  • 3
-2
votes
1 answer

Better way to test multiple websites through automation

I am trying to find a better automation tool to perform the websites testing automatically to identify the bugs using various mobile devices and browsers. Tried with various no code automation tools and Browserstack and Lambdatest as well. but not…
-2
votes
1 answer

Windows UIAutomatin in C language

I have written a c++ program by using UIAutomation on windows. The libraries I have used are windows.h and Uiautomation.h. It works well. However, I want to convert the program to C program. (There is no classes). When I try to do it, I have taken…
computerengineer
  • 109
  • 1
  • 2
  • 8
1 2 3
21
22