Questions tagged [automationelement]

A class within System.Windows.Automation; represents a UI Automation element in the UI Automation tree, and contains values used as identifiers by UI Automation client applications.

AutomationElement represents a UI Automation element in the UI Automation tree, and contains values used as identifiers by UI Automation client applications. It is found within the System.Windows.Automation namespace.

48 questions
5
votes
2 answers

AutomationElement is still alive?

I am using the Microsoft UI Automation and have some problems with it, one being that I want to know if an AutomationElement is still alive. More precisely I want to check if a window has been closed. I think this is the most common case for this…
4
votes
2 answers

Set DateTimePicker element via AutomationElement

I want to be able to set a DateTimePicker element to a certain time via AutomationElement. It stores the time as "hh:mm:ss tt" (i.e. 10:45:56 PM). I get the element as such: ValuePattern p =…
jpints14
  • 1,361
  • 6
  • 15
  • 24
4
votes
1 answer

Access Silverlight window within Chrome via System.Windows.Automation

This is probably futile, but I'm wondering if anyone out there has experience doing this. I'm trying to access a Silverlight application hosted within Google Chrome by using System.Windows.Automation (e.g., AutomationElement). The problem I'm having…
user1228
3
votes
0 answers

C# - Which interface is not registered and how do I register it?

I am trying to write a console app that will navigate the AutomationElement tree in any open program on Windows 10. My app actually works great with every open program I've tried... except for Chrome. Some installs of Chrome work, but some don't.…
2
votes
0 answers

UIAutomation AutomationElement force refresh .current and all descendants

I would like to refresh the tree structure of the top level automationelement object (the desktop element) and all of its descendants. The problem I have ran into is a particular program I am testing discards and rebuilds its GDI objects in a…
Abdul Hfuda
  • 1,463
  • 12
  • 25
2
votes
0 answers

Retrieve non-control child from automation element

Using the inspect.exe tool, I can see that an automation element has 6 children, but one of them has both the isControlElement and isContentElement set to false. I then used windows automation in c#, to try and retriev the children of the automation…
Filip5991
  • 383
  • 1
  • 3
  • 13
2
votes
1 answer

UI Automation - Retrieving data from a SysListView32 (or any Listview)

I'm trying to retrieve data from a SysListView32 object with the code below but it's returning an empty string. The elements that I need to retrieve are those highlighted in red, as well as the others contained in the other ControlType.ListItem…
2
votes
0 answers

Windows Automaton - InvokePattern blocking execution until everything has completed

I have experienced this behavior in my automation application: when I "click" a button by calling the InvokePattern.Invoke() method everything stops until the handler of the click event inside the automated application finishes. While this can make…
Karel Frajták
  • 4,389
  • 1
  • 23
  • 34
2
votes
0 answers

Windows UIAutomationElement memory leak

I have a WPF application that needs to be automatized for the purpose of testing. There is an existing tool that does this using Windows UIAutomation framework. The problem with that is when I try to access elements on the main app and to trigger…
2
votes
1 answer

Memory leak with custom FrameWorkElementAutomationPeer with IExpandCollapseProvider in C#

We use AutomationUIClient console application to test our WPF application. We set up in our WPF application a custom class TreeItemAutomationPeer with ISelectionProvider ad IExpandCollapseProvider If this object is use by automation application…
2
votes
2 answers

Get name of window which is being closed using automation events c#

I'm working on a project where I need to get the name of windows which is being closed. I'm using C# Automation events for this. I've pasted below the code that I'm…
akhi1
  • 1,322
  • 1
  • 16
  • 25
2
votes
1 answer

UIA Automation element GDI Leaks in the Target application process

I have created my own extension methods, which contains Automation Element implementation to find any Win32, WPF controls during run time. I have given the dynamic attributes and parent control as input and find the control using UIA concept and…
2
votes
1 answer

Hosting Word in Browser - AutomationElement IsWindowPatternAvailable - how to set it?

We are hosting MS-Word documents in a WebBrowser control in a WPF application. The WebBrowser control shows the following dialogue during the navigation to a selected MS-Word document: We try to close the dialogue programmatically using…
user2219063
  • 128
  • 6
2
votes
1 answer

C# recursion to find automationElement in open dialog box

I'm trying to browse to a file after i click the download button. But I though of writing a recursive function that finds controls in any window using AutomationElement library so hopefully i can find the nested controls in the open dialog window.…
Samy
  • 49
  • 9
2
votes
3 answers

How to get the value of a spinner out of an AutomationElement through RangeValuePattern?

I am trying to get the value in the spinner out of it to check that it was entered correctly through an AutomationElement in C#. What I am currently doing is attempting get it out through the TryGetCurrentPattern as shown below, however it only…
1
2 3 4