如何在VS2015中运行简单的编码UI测试?

时间:2016-06-30 20:04:08

标签: visual-studio-2015 coded-ui-tests

我正在尝试运行我能想到的最简单的编码UI测试。我有一个空的类库解决方案,我已经添加了一个编码的UI测试项目。

使用步骤记录器我记录单击“开始”菜单(在Windows 8.1中)并启动Windows计算器附件程序的操作。

当我尝试运行此测试时,它失败并出现以下断言:

RelatedObjectDoesNotExist

在我的UIMap.uitest文件中,我已将“开始”客户端的搜索配置更改为始终搜索,但我得到的结果相同。

它似乎很奇怪,它找不到任务栏上的“开始”按钮,因为它始终可见。

还有什么我可以尝试让它发挥作用吗?

其他生成代码:

Test Name:  CodedUITestMethod1
Test Outcome:   Failed
Result Message: 
Test method CodedUITestProject1.CodedUITest1.CodedUITestMethod1 threw exception: 
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: 
TechnologyName:  'MSAA'
ControlType:  'Client'
Name:  'Start'
 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

0 个答案:

没有答案