“另一个控件正在阻止该控件.请使被阻止的控件可见,然后重试该操作. [英] "Another control is blocking the control. Please make the blocked control visible and retry the action."

查看:155
本文介绍了“另一个控件正在阻止该控件.请使被阻止的控件可见,然后重试该操作.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在CodedUI测试中,我有一个需要单击单选按钮的情况.单击URL链接后,单选按钮就会出现,并出现在弹出窗口中.

In CodedUI Test, I have a scenario where I need to click on a radio button. The radio buttons are appearing as of result of clicking on a URL link and appears in a pop up window.

代码已生成如下,

#region变量声明
           HtmlRadioButton uISearchTypeRadioButton = this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.UIKeoghsDocument.UISearchTypeRadioButton;
           #endregion

           //选择"SearchType"单选按钮
           uISearchTypeRadioButton.Selected = this.RecordedMethod2Params.UISearchTypeRadioButtonSelected;

 #region Variable Declarations
            HtmlRadioButton uISearchTypeRadioButton = this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.UIKeoghsDocument.UISearchTypeRadioButton;
            #endregion

            // Select 'SearchType' radio button
            uISearchTypeRadioButton.Selected = this.RecordedMethod2Params.UISearchTypeRadioButtonSelected;

但是,codedUI测试失败并收到标头中指定的错误消息.请提出建议.

But, the codedUI test is failing and getting error message as specified in the header. Please suggest.

推荐答案

在对该控件执行操作之前,请稍等:

Try to put some wait before performing action on that control:

//Wait for the popup frame to appear
this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.WaitForControlExist();
//Wait for the control to be ready
this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.UIKeoghsDocument.UISearchTypeRadioButton.WaitForControlExist();
this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.UIKeoghsDocument.UISearchTypeRadioButton.WaitForControlReady();
//action
this.UIT10000007NoTitleInteWindow.UIT10000007NoTitleDocument.UIUimodalFrameFrame.UIKeoghsDocument.UISearchTypeRadioButton.Selected = true;//false...


这篇关于“另一个控件正在阻止该控件.请使被阻止的控件可见,然后重试该操作.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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