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
2
votes
2 answers

Sending clicks to an AutomationElement with no InvokePattern

Using AutomationElement, is there any way send clicks to a TabItem without having to move the mouse and simulate clicks? AutomationElement is still new to me - as far as I understand it, unless it supports the InvokePattern (which TabItem does not)…
duck
  • 747
  • 14
  • 31
2
votes
1 answer

How do I find an AutomationElement when using task scheduler and user is logged off?

I have an application that is set to run at a specific time of day when the user is logged off. It uses a combination of Selenium and UI Automation in C# to download a file every day. When run logged in, everything is fine. However, when I run the…
2
votes
2 answers

Get Contents Of Image Class From AutomationElement

I am walking controls in a third party app that contains images. The automation element returns the class name Image, Any ideas on how I can get the contents of that Image as a bitmap object, or even bytes?
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
2
votes
1 answer

AutomationElement.FromHandle(IntPtr Handle) stops the application

private string GetCurrentChromeUrl() { try { string url = null; int handle = GetForegroundWindow(); AutomationElement elm = AutomationElement.FromHandle((IntPtr)handle); …
2
votes
2 answers

TreeWalker traverses controls from another window

I'm working with application window containing a lot of log messages. I need to filter them and retrieve those only that mathches some condition. My choice to traverse them all is TreeWalker as filtering full bulk of messages after…
Grade
  • 574
  • 1
  • 5
  • 16
2
votes
2 answers

Running automated UI tests as part of CI

I'm working on an automated test suite for a large WPF application. I've created a wrapper library for Microsoft Windows Automation API (previously known as UI Automation Framework), and I use it in order to implement various sanity tests. My team…
2
votes
2 answers

FindFirst always returns null AutomationElement

I am trying to test some custom controls with the UI Automated framework. One of my controls has a base class of TextBox and the other inherits from Control. I can find my first control with my tests, however no matter what combination I use of…
Justin
  • 414
  • 4
  • 13
1
vote
1 answer

How to work with AutomationElement in C# properly

I want to test a windows application that is formed with Windows Forms. I decided to work with the library AutomationElements. The problem is that I don't know how to use it properly. For example: How can I write in a textbox that I'm handling with…
1
vote
0 answers

TestStack.White - using SearchCriteria.ByNativeProperty

Analysing with UI Spy, I want to get the following element: Looking at all this parameter, the "LabeledBy" parameter seems to be the best parameter to identify the element. I'm using TestStack.White for my automation and tried it that…
Jan021981
  • 521
  • 3
  • 28
1
vote
1 answer

How to get a custom property value which cannot be accessed using AutomationElement properties in c#

I want to get the text "Running" which is under the property Value.Value. However, this is not part of the properties listed in the available fields of the AutomationElement Class.
user6023770
1
vote
0 answers

Why do automation element properties not match the value from Inspect?

Having fetched an AutomationElement I get the IsContentElement property using: bool isContentElement = (bool)element.GetCurrentPropertyValue(AutomationElement.IsContentElementProperty); Console.WriteLine(isContentElement); Outputs True in my…
Woodgnome
  • 2,281
  • 5
  • 28
  • 52
1
vote
0 answers

Determine whether an AutomationElement is visible

Is there any way to determine if an AutomationElement is visible to the user? Both ClickablePoint and IsOffcreen have exceptions where they show/hide (un)desired elements. Eg. when I have a fullscreen window the desktop icons have no ClickablePoint…
sollniss
  • 1,895
  • 2
  • 19
  • 36
1
vote
1 answer

Get AutomationElement for a WPF UserControl

I want to use Windows AutomationElements to simulate Userinput during testing. My particulat usecase is manupilating a ListBox selection and from what I find online I will need an AutomationElement for my listbox in order to manipulate it. Suppose I…
Johannes
  • 6,490
  • 10
  • 59
  • 108
1
vote
1 answer

UI automation .net invoke pattern not working

Good day everyone, have some trouble with UI automation while trying to click a button on Outlook security warning while trying to send mails through My client, when I try to send it it shows the alert prompt to choose if I want to allow e-mail send…
Wairhard
  • 19
  • 6
1
vote
0 answers

AutomationElement in flash

I'm using the AutomationElement-Class to find a chat in a flash application (BigBlueButton, http://demo.bigbluebutton.org, I'm testing it there) in a browser (firefox). It seems to work as long as no new messages appear. Every time a new Message…