为什么Coded UI Test能够找到名称属性不匹配的控件 [英] Why Coded UI Test able to locate a control with name property mismatch

查看:74
本文介绍了为什么Coded UI Test能够找到名称属性不匹配的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,有一个页面只有一个具有名称属性"wd"的htmledit控件,我编写下面的代码来搜索htmledit控件,父控件"浏览器"等。是顶级窗口,位置正确。

For example, there is a page have only one htmledit control with name property "wd", I write following codes to search for a htmledit control, the parent control "browser" is the top level window and is located correctly.

HtmlEdit inputEdit = new HtmlEdit(browser);

HtmlEdit inputEdit = new HtmlEdit(browser);

input.SearchProperties [" name"] =" q";

input.SearchProperties["name"] = "q";

input.text =" test";

input.text="test";

 

结果是  htmledit控件,名称属性为"wd"。通过代码找到并输入"test",我只是想知道为什么可以找到名称属性不匹配的htmledit控件。

The result is htmledit control with name property "wd" is found by the codes and entered the "test", I just wondering why the htmledit control can be found with the name property mismatch.

 

感谢您的帮助!

推荐答案

根据此
文章
,编码的UI智能匹配算法可能假设控件名称已更改。

According to this article, Coded UI smart match algorithm might be assuming that the control name has changed.

由于整个页面中只有一个控件,因此播放引擎无需过滤,但相同。

And since there is only one control in entire page, the playback engine has nothing to filter but the same.


这篇关于为什么Coded UI Test能够找到名称属性不匹配的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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