在 C# 中使用自动化元素 [英] Using AutomationElement in C#

查看:38
本文介绍了在 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

解决方案

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

这篇关于在 C# 中使用自动化元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆