【发布时间】:2017-02-27 10:31:05
【问题描述】:
【问题讨论】:
标签: c# xamarin-studio ui-testing
【问题讨论】:
标签: c# xamarin-studio ui-testing
可能最简单的方法是使用 Xamarin 测试记录器: https://developer.xamarin.com/guides/testcloud/testrecorder/?ide=xs
如果您使用的是 Visual Studio,该工具仍处于预览阶段,需要 Visual Studio Enterprise 订阅: https://developer.xamarin.com/guides/testcloud/testrecorder/?ide=vs
测试记录器允许您与应用交互,并且将根据您的交互生成测试。
您可以做的另一件事是使用 Repl() 方法打开终端 (Mac)/命令行 (Windows) 实例,您可以在其中检查可视化树并找到屏幕上的所有元素。看: https://developer.xamarin.com/guides/testcloud/uitest/working-with/repl/
进入 REPL 后,您可以使用 tree 命令以 Json 格式查看所有可见的 UI 元素,该格式向您显示视觉元素的类型和一些属性。您还可以像在 UITest 项目中一样执行任何查询,以便查看从查询中得到的结果。
【讨论】: