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
1
vote
1 answer

AutomationElement / Context Menus

Description I am trying to be able to interact with context menus using UI Automation. Basically, I am trying to: set focus on an AutomationElement SendKeys.SendWait to send a SHIFT+F10 see what pops up What I Am Seeing What I am seeing is that…
Levi
  • 839
  • 2
  • 7
  • 21
1
vote
2 answers

Using Windows.Automation, can I locate an AutomationElement by regex?

I have an object tree that has row objects within a table parent. I'm attempting to put all these rows into an AutomationElementCollection AutomationElementCollection asdf = ParentTableObj.FindAll ( TreeScope.Children, new…
Zee
  • 1,780
  • 3
  • 16
  • 27
1
vote
1 answer

Automation FindFirst on TreeScope does not find element

I have a problem with TreeScope finding an element in Internet Explorer when searching the Name property and ControlType property. mainElement is the AutomationElement representing "internet Explorer_Server. all automation elements are listed…
Clos
  • 27
  • 6
1
vote
1 answer

AutomationElement can't find row cell values (but UISpy does)

I'm trying to get data from a window that has 3 lists (SysListView32). I do the same on the three of them, both UISpy and Inspect DO see rows and cells in the three of them, but when in code two of them works perfect (Caption="List2" and…
Dídac Punyet
  • 315
  • 3
  • 15
0
votes
1 answer

AutomationElement.FromHandle() execution time is intermittently slow

I am working on UI test automation and have noticed that usually AutomationElement.FromHandle is quite fast, but occasionally it takes 30 seconds to return an AutomationElement. From my limited logging it either takes less than 100ms or a full 30…
tmoltzan
  • 371
  • 1
  • 3
  • 6
0
votes
0 answers

UIAutomation with "" (Empty String) Name value, does not reflect changes during runtime

One application I'm automating some tests for is initializing a Text field (UIA_TextControlTypeId(0xC364)) and the developer has it set to initialize as a blank "" for its contents and corresponding Name. At runtime they update this text field with…
Abdul Hfuda
  • 1,463
  • 12
  • 25
0
votes
0 answers

Contains Dialog?

I am trying to determine if a specific ie window (based on title) has an open dialog box using a windows form in Visual Studio 2010 (similar to how UISpy functions). I've looked into using the Windows Automation library and the AutomationElement…
mp42871
  • 191
  • 1
  • 5
  • 16
0
votes
0 answers

Redirecting Web browser tab on Windows

I would like to redirect web browser Url with a different specific URL. I believe I can do it by changing the Host file in Windows, however I would like to try a way to do it Winforms/C# app. One way of doing it would be getting current tab process…
Meric Ozcan
  • 678
  • 5
  • 25
0
votes
0 answers

How can I access the Open File Dialog Open button when it is a pane?

I have a suite of tests that exercise a GUI project. The testing software is written in C# using the NUnit framework. The tests access the parts of the GUI by reducing its components to a series of AutomationElement objects. By manipulating these…
doug4
  • 21
  • 2
0
votes
0 answers

AutomationElement don't find UWP fullscreen window

In my WPF app I'm trying to get the AutomationElement of a UWP app window. This is my code: AutomationElement root = AutomationElement.RootElement; PropertyCondition condition = new PropertyCondition(AutomationElement.NameProperty,…
Broge
  • 73
  • 3
  • 13
0
votes
0 answers

How to create a Windows Form in C# that can be seen only but can not be clicked or brought to focus

I am working on an Accessibility Screen Reader application that will put a rectangle highlighter around the element that is selected on the Focused program. I am able to detect the currently focused AutomationElement, and get its BoundingRectangle…
0
votes
0 answers

Get all opened tab URL's in C# windows forms

I'm trying to get all the url's of google chrome in windows forms with c#. Currently I had tried with an AutomationElement which gives me only active tab url instead of all opened tabs. My code is like below: public void GetAllUrls() { Process[]…
Srikanth Reddy
  • 447
  • 1
  • 8
  • 23
0
votes
1 answer

automationelement write

Im working on a test to test a desktop application. Im using automation elements, from the API of microsoft. I want to write on textboxs. How can I write in a textbox that i get with an automationelement? Im trying to make a test that navegate…
Javi
  • 81
  • 12
0
votes
0 answers

Get Selected text from anywhere outside the application

Context: I have been tasked with implementing the functionality to be able to retrieve the currently selected text of the active window then pressing a registered HotKey combo. Hotkeys registered with user32.dll RegisterHotKey This is used to mark a…
Simon Jensen
  • 488
  • 1
  • 3
  • 19
0
votes
0 answers

TestStack.White window from handle or AutomationElement

I have been unable to get a teststack window object by only using an automationelement or window handle. By looking at source code, I can see that this functionality is protected. Does anybody know of an easy way to do this. Without finding the…
Danhol86
  • 1,352
  • 1
  • 11
  • 20