第二次隐藏Codedui菜单项 [英] Codedui Menu Item hidden second time around

查看:78
本文介绍了第二次隐藏Codedui菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我希望有人可以给我一些指导。我有一个具有Find - >的应用程序作为提及选项的人。


当回放我的脚本时,第一个Find-Person成功运行了codeui脚本,但如果我想再次返回该选项,我收到错误消息:无法对隐藏的控件执行"点击"。


控件与第一次相同,所以我很困惑为什么它第二次失败。控件在执行后是否隐藏?



解决方案

嗨Alan Coogan,


>>

但如果我想再次返回该选项,我收到错误消息:不能执行隐藏控件上的"点击"。


因为第二次出现这个问题,

请检查控件"Find - Person"的已启用属性是否在首次单击后更改为false。此外,我们经常使用
BoundingRectangle.Width 属性来检查隐藏控件。


参考:

https://social.msdn.microsoft.com/Forums / en-US / 96cebd1d-972f-49cf-93cd-9f872400bb3c /无法执行点击隐藏控制?forum = vstest


如果控件的属性已更改,我们必须修改它在第二次点击之前再次显示。如果控件的属性在
点击之前和之后是一致的,请使用" Control.DrawHight(); "事件检查是否可以在屏幕上正确找到控件。


另外,请检查看看是否在第一次点击后打开了一些对话框,导致"查找 - 人"不要在顶层。据我所知,
编码的UI测试仅识别最顶层的控件。请将控件设置到顶层并识别它。


如果您仍有问题,请提供您测试的应用程序的详细信息。 (对我来说,分享申请对我来说更快找到问题,关于在SkyDrive中分享
文件,请参考:
http://windows.microsoft.com/en-us/skydrive/change-access-permissions-faq


问候,


Judyzh


Hello,

I'm hoping someone can give me some guidance. I have an application which has Find -> Person as a mention option.

When playing back my scripting the codeui script runs successfully for the first Find - Person but if I want to go back into that option again I am getting the error message : Cannot perform 'Click' on the hidden control.

The control is the same as the first time around so I'm confused as to why it then fails the second time around. Does a control get hidden after has been executed?

解决方案

Hi Alan Coogan,

>> but if I want to go back into that option again I am getting the error message: Cannot perform 'Click' on the hidden control.

Since this problem occurs when second time around, please check the Enabled property of the control "Find - Person" whether it changed to false or not after first click. Also, we often use BoundingRectangle.Width Property to check for the hidden control.

Reference: https://social.msdn.microsoft.com/Forums/en-US/96cebd1d-972f-49cf-93cd-9f872400bb3c/cannot-perform-click-on-the-hidden-control?forum=vstest

If the property of the control has been changed, we must modify it before the second click to make it visible again. If the control's properties are consistent before and after the click, please use "Control.DrawHight();" event to check whether the control can be found correctly on the screen.

In addition, please check to see if some dialog boxes have been opened after the first click, causing "Find - Person" to not be on the top level. As far as I know, coded UI Test only recognize the topmost control. Please make the control to the top level and to recognize it.

If you still have the issue, please provide the details of your application that you test. (Share application to me will be better for me to find the issue quickly, about share files in the SkyDrive, please refer to: http://windows.microsoft.com/en-us/skydrive/change-access-permissions-faq)

Regards,

Judyzh


这篇关于第二次隐藏Codedui菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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