J. Grohmann
J. Grohmann

Reputation: 399

Using AutomationElement in C#

I'm trying to use the AutomationElement object for UIAutomation in C# but it is not being recognized. I'm guessing it's not part of the standard library since I'm getting a hint by Visual Studio saying that I might be missing a reference, but which reference do I need to add to use the AutomationElement?

I've tried UIAutomationClient but it didn't work even though this is what should contain AutomationElement according to the Microsoft documentation.

Hope someone can help

Upvotes: 0

Views: 2252

Answers (1)

Alas
Alas

Reputation: 537

in the link you posted you have all the info, you need to add a reference to UIAutomationClient (right click on project references) and add the namespace System.Windows.Automation to your source

add reference add namespace

Upvotes: 2

Related Questions