我真的想知道,Inspect.exe如何获取它的UI元素,因为它获得的元素比UISpy多得多(两者都在Microsoft Windows SDK 7中可用)
1)我认为UISpy通过UIAutomation库获取它的元素,对吗?(尝试使用UIAutomation并获得完全相同的元素,显示UISpy)
2)Inspect.exe使用哪个库?因为它显示了一些带有MacromediaFlashPlayerActiveX的应用程序的UI元素,我需要在自己的UI-Automation-Application中获取,希望有人知道它.
编辑:Inspect也有一个"UI自动化"模式,它是否也使用UIAutomation库?关于它的奇怪之处在于,在Inspect中它还显示了比UISpy更多的元素.
先感谢您
.net ui-automation ui-spy microsoft-ui-automation inspect.exe
我使用UISpy来检测outlook TO Address Field但是uispy将值返回为"?"
如果它是普通文本,那么Uispy会正确检测到它显示的是To Address.问题是当我们在To address字段中输入任何电子邮件地址时,它转换为超链接我们如何使用Ui间谍获取地址.
我正在做一个 C# windows 窗体应用程序,它使用 System.Windows.Automation 类自动化另一个 win32 应用程序。
有一些元素我需要阅读或交互,但 UISpy 没有找到这些字段,它只找到了父容器面板。
例如,下面的代码块应该返回许多工具条按钮但不起作用:
var mainWindow = AutomationElement.RootElement.FindChildByNamePart("Back Office Control");
var mainWindowChildren = mainWindow.FindAll(TreeScope.Children, Condition.TrueCondition);
var toolBarPanel = mainWindowChildren[1];
var toolBarItens = toolBarPanel.FindAll(TreeScope.Children, Condition.TrueCondition);
Run Code Online (Sandbox Code Playgroud)
还有另一种方法可以做到这一点吗?