编码的UI无法运行脚本或无法找到之前运行的相同控件 [英] Coded UI fails to run the script or fails to find the same control for which it was running earlier

查看:79
本文介绍了编码的UI无法运行脚本或无法找到之前运行的相同控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功跑了 使用Test>的脚本运行>所有测试。

I successfully ran  the script using Test > Run > All Tests.

此时脚本成功运行到某一点。现在,当我再次运行相同的脚本时,它无法找到之前成功运行的元素。我得到UITestControlNotFoundException用于之前运行相同脚本
的同一个控件?

At that time the script ran successfully to a point. Now, when I am running the same script again, it is failing to find the element for which it ran successfully earlier. I get UITestControlNotFoundException for the same control which ran the same script earlier?

有没有办法防止这种情况? 

Is there a way to prevent this? 

这是否意味着通过Coded UI进行编码是一种非常不可靠的自动化方法,或者有办法处理这个问题?

Does it mean coding through Coded UI is a very unreliable way to automate or there are ways to handle this?

推荐答案

您是否在同一台机器上运行测试脚本?

Do you run the test script on the same machine?

编码的UI测试有点挑剔,即使屏幕分辨率可能会影响测试结果,如果它没有在记录它的机器上运行。

Coded UI test is bit a picky, i.e. even the screen resolution might affect the test result if it's not running on the machine where it's recorded.

无论如何,请与我们分享完整的错误消息。

Anyway, please share the complete error message with us.

 

问候,

Fletcher


这篇关于编码的UI无法运行脚本或无法找到之前运行的相同控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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