如何获取对在 Windows Phone 7 模拟器中运行的应用程序的 AutomationElement 引用? [英] How can I obtain an AutomationElement reference to an application running in the Windows Phone 7 Emulator?

查看:25
本文介绍了如何获取对在 Windows Phone 7 模拟器中运行的应用程序的 AutomationElement 引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows Phone 的 Silverlight 支持包括对 System.Windows.Automation 类的支持,但似乎没有任何方法可以获取对应用程序的 AutomationElement 引用从模拟器外部(从 .NET 4 测试客户端,类似于您访问 Silverlight 应用程序的方式).

Windows Phone's Silverlight support includes support for the System.Windows.Automation classes, but there doesn't appear to be any way to get an AutomationElement reference to the application from outside the emulator (from a .NET 4 test client, similar to the way you would access a Silverlight application).

我试过了:

  • 在 XDE 窗口上使用 AutomationElement.FromHandle,但这只会为我提供窗口本身的自动化元素(毫无疑问,因为模拟器是虚拟机)
  • 在 Microsoft.Smartdevice.Connectivity 中四处窥探,但似乎没有任何有用的东西
  • Using AutomationElement.FromHandle on the XDE window, but that only gives me automation elements for the window itself (no doubt because the emulator is a VM)
  • Snooping around in Microsoft.Smartdevice.Connectivity, but there doesn't seem to be anything useful there

有什么想法吗?

推荐答案

初始版本不支持自动化... https://stackoverflow.com/questions/4137528/ui-automation-for-wp7

Automation is not supported in the initial release ... https://stackoverflow.com/questions/4137528/ui-automation-for-wp7

这篇关于如何获取对在 Windows Phone 7 模拟器中运行的应用程序的 AutomationElement 引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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