编码的ui突然停止重新组合并为记录的测试提供错误 [英] Coded ui suddenly stops reconizing and gives errors for recorded tests

查看:62
本文介绍了编码的ui突然停止重新组合并为记录的测试提供错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编码ui的新手,但我对这种错误比较熟悉,工具突然停止重新调整,无法在屏幕上找到对象。



可能问题的答案



否,代码或计算机上没有任何变化


没有动态对象问题 


相同的测试几分钟前正在运行SUCCESS


我也试过创建一个新项目,创建一个新的测试并运行(如果在UImap.Designer.cs中可能出现了某些问题,但是没有,  它没有帮助仍然不再重新计算



放三个.sleep没有帮助


不,启动浏览器或视觉工作室没有帮助(VS 2017)



请分享您对此问题的意见和建议,欢迎任何帮助,谢谢。





$

解决方案

嗨rastek,


欢迎来到MSDN论坛。


似乎您通过Coded UI Test构建器生成代码,然后您可以按照以下步骤解决问题:


  1. 请确保我们在浏览器中使用相同的缩放设置进行这些测试。
  2. 在运行测试之前保持浏览器开启。
  3. 在第一次成功测试后,页面应该在页面C,如果我们现在运行测试,播放将停止,因为它无法在页面C找到所需的页面A元素。因此,请确保我们将起始页面设置为相同的状态成功测试。
  4. 查找错误消息无法找到的控件,检查它是否是复合控件,如下拉列表。并使用十字准线验证元素是否可以通过CUIT播放引擎识别
  5. 关闭Coded UI Test构建器,打开UIMap.uitest文件,删除TestMethod中的额外鼠标悬停操作。


如果你使用手写方式来运行测试,请分享它抛出异常的特定代码。


此外,我建议您使用IE浏览器进行编码UI测试。它对CUIT有更多支持。


如果此问题仍然存在,请在这里分享完整的错误消息(Message和StackTrace),这将帮助我们
重现此问题。



最好的问候,


萨拉


I am new to coded ui but I am familier with this kind of error, tool suddenly stops reconizing and can not find objects on the screen.

Answers to possible questions

NO, nothing changed on code or on the computer

No there is no dynamic object issue 

Same tests were running SUCCESS a few minutes ago

I also tried create a new project , create a new test and run (In case of maybe something is broken in UImap.Designer.cs, but no,  it doesnt helps still not reconize anymore

Putting threead.sleep doesn help

No, starting browser or visual studio doesnt help (VS 2017)

Please share your opinion and advices on this issue, any help is welcome, thanks.

解决方案

Hi rastek,

Welcome to the MSDN forum.

It seems that you generate the code by Coded UI Test builder, then you can follow steps below to troubleshot the issue:

  1. Please make sure we use the same zoom setting in the browser for those tests.
  2. Keep the browser on before running the test.
  3. After the first successful test, we should reset the browser to the start page. For example: if we test a web app, we start recording at page A, and end recording at page C. Then after the first successful test the page should be at page C, if we run the test now, the playback will stop because it can’t find required page A element at page C. So make sure we set the start page at the same state as the successful test.
  4. Find the control which can’t be found by error message, check if it’s a composite control like drop-down list. And using the crosshair to validate whether the element can be recognized by CUIT play engine.
  5. Close the Coded UI Test builder, open UIMap.uitest file, delete the extra mouse hover action in the TestMethod.

And if you use hand-writing way to run the tests, please share the particular code where it throws an exception.

In addition, I recommend you use IE explorer for your Coded UI Test. It has more support for CUIT.

If this issue persists, could you please share the complete error message (Message and StackTrace) here, that will help us to reproduce this issue.

Best regards,

Sara


这篇关于编码的ui突然停止重新组合并为记录的测试提供错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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