文本框字段中的编码的UI测试错误 [英] Coded UI testing errors in text box fields

查看:68
本文介绍了文本框字段中的编码的UI测试错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我目前正在Web应用程序上运行测试,我注意到,当我告诉VS单击文本框字段并输入一些文本时,该测试将失败,但是如果我预先输入文本并仅使用CUI测试单击按钮不会失败并且测试成功,这是为什么?

从结果中得出的错误即时消息很长
错误消息:

hey guys im currently running tests on web applications, and i have noticed that when ever i tell VS to click on a text box field and type in some text, the test fails, but if i pre enter the text and just use the CUI test to click the button it does not fail and test is successful, why is this?

error im getting is pretty long from the results
error message:

Test method TestProject1.CodedUITest8.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException: The control is not available or not valid. Additional Details:
TechnologyName:  'MSAA'
Name:  'MIKES TRAVEL SHOP'
ControlType:  'Edit'
 ---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException: The control is not available or not valid. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.



我必须重命名文本框吗?如果是,那么这是如何完成的,就像当我尝试打开XML格式的UIMap.uitest文件时一样.

非常感谢您的任何帮助:)

Matt.



do i have to rename the text box?, if so then how is this done, as when i try and open the UIMap.uitest file it is in XML.

any help is very much appreciated :)

Matt.

推荐答案

您好.

如果您尚未解决此问题.

对我来说,我通过将标签与文本之间的关联添加到控件中来解决此问题.

似乎控件的名称是通过使用文本而不是名称本身找到的.
Hello.

If you have not fixed this yet.

For me, i fixed this problem by adding an association from a label with text to the control.

It seems that the name for the control is found by using the text, and not the name itself.


这篇关于文本框字段中的编码的UI测试错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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