MSAA未能找到WinForms控件 [英] MSAA Fails to find winforms controls

查看:311
本文介绍了MSAA未能找到WinForms控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用codeD UI自动化的应用程序。在自动化过程中一个复杂的过程发生在应用程序(加载应用程序中一个PowerPoint)内。经过这个过程,因为MSAA无法找到在application.I任何控件现在用Inspect.exe,前后自动失败,我不能继续测试。我附上前后失败后检查工具的截屏。是否有任何解决方案,以解决这个问题?我不能继续自动测试,无需重新启动,每当我面对这个问题的应用程序。
任何帮助将大大AP preciated!

I am using Coded UI to automate an application. In the automation process a complex process happens inside the application (loading a PowerPoint inside the application). After this process I can't continue the test because MSAA unable to find any controls in the application.I am using Inspect.exe, before and after the automation fails. I have attached the screen shot of Inspect tool before and after the failure. Is there any solution to overcome this issue? I can't continue automation testing without restarting the application whenever I face this problem. Any help would be greatly appreciated !

推荐答案

codeD UI支持WinForms和WinControls的。我会建议你使用下面的code找到WinWindow:

Coded UI supports WinForms and WinControls. I'll suggest you to find the WinWindow by using the code below:

`WinWindow samplewindow = new WinWindow();
 samplewindow.SearchProperties[WinWindow.PropertyNames.Name] = "XXYYZZZ";
 samplewindow.SearchProperties[WinWindow.PropertyNames.ClassName] = "XXYYYZZZ";
 WinButton uIButton = new WinButton(samplewindow);
 uIButton.SearchProperties[WinButton.PropertyNames.Name] = "XXYYYZZZ";
 Mouse.Click(uIButton, MouseButtons.Left, System.Windows.Input.ModifierKeys.None, uIButton.GetClickablePoint());'

这篇关于MSAA未能找到WinForms控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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