编码的UI测试 - 获取FailedToPerformActionOnBlockedControlException [英] Coded UI Testing - Getting FailedToPerformActionOnBlockedControlException

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

问题描述

我是Coded ui Testing的新手,英语也不是我的母语,所以我会努力做到最好。

I am new to Coded ui Testing, also English is not my native language, so i will try to do my best.

我无法对文本框执行操作。我也使用了一些telerik控件。

I am unable to perform an action on textbox. I'm also using some telerik controls.

我有一个RadTabControl(控件类型选项卡),其中RadTabItems(控件类型TabItem)由用户在运行时生成此RadTabItem有一个窗格在我内部,我有被阻止的控件。

I have a RadTabControl (Control Type Tab), in which RadTabItems (Control Types TabItem) are generated by the user during runtime this RadTabItem has a pane and inside it i have the controls that are getting blocked.

在使用Coded UI Test Builder的操作记录期间,当我尝试单击一个控件时,它会在顶部窗口中记录一个单击,不是控件本身,但是当向控件写入文本时,它会将一个set属性记录到wpfedit对象。

During the actions record with Coded UI Test Builder when i'm trying to click a control it records a click on the top window and not to the control itself, but when writing text to the control it records a set property to the wpfedit object.

我还尝试在运行testmethod时突出显示控件,它没有抛出异常并突出显示控件的正确控制。 

I also tryed to highlight the control when running the testmethod, it did't throw an exception and highlighted the control the right control. 

任何想法?,我无法直接在此处粘贴代码。但我会发送你可能需要的马赫信息。

Any ideas?, i am not able to directly paste code in here. But i would send as mach information as you may need.

谢谢

 

推荐答案

嗨大家:



我们在使用telerik控件的WPF应用程序上遇到了Coded UI Test项目的一些问题。 />
当试图对WPF窗口内的控件(通用WPF控件,而不是telerik)执行操作时,一切正常,我的意思是,生成的代码如下:



Mouse.Click(uIAccountIDEdit);
$


但尝试使用相同的动作执行相同操作时会出现一些问题RadDocumentPane下的控件类型(通用WPF控件)(位于属于RadDocking控件的RadPaneGroup内)。问题是当我们记录
测试时(以前的方式与之前相同)如果我们点击一​​个控件,生成的代码如下:



Mouse.Click(uIWpfWindow,new Point(330,72)); 



这一点都不好,因为屏幕相关,我们不希望这样。

如果我们用这段代码代替代码上面(Mouse.Click(uIAccountIDEdit))执行应用程序时,我们收到以下错误消息:
$


"无法对阻塞的控件异常执行操作"



问题是我们可以处理控件,我的意思是,我们使用生成的代码或AutomationId属性找到它,甚至可以突出显示它(使用&ubsp; uIAccountIDEdit.DrawHighlight) ,但我们无法执行点击操作或将文本设置为控件,例如
,使用uIAccountIDEdit.Text属性,因为我们收到相同的错误消息。



我相信这个奇怪的行为与RadDocumentPanes有关,但是我们尝试了很多东西而且我们无法避免这个错误,所以我们无法继续执行任务。


$
您对此有何疑问?


谢谢,
Hi Guys:

We are also having some issues with a Coded UI Test project over a WPF application that uses telerik controls.
The thing is when trying to perform an action over a control (common WPF control, not telerik) that is inside a WPF Window everything works fine, I mean, the generated code is the following:

Mouse.Click(uIAccountIDEdit);

But there is some problems when trying to perform the same action with the same type of control (common WPF control) under a RadDocumentPane (that is inside a RadPaneGroup that belongs to the RadDocking Control). The thing is that when we are Recording the test (the same way than before) if we click over a control the generated code is the following:

Mouse.Click(uIWpfWindow, new Point(330, 72)); 

This is not good at all because is screen related and we don't want that.
If we substitute this code for the code above (Mouse.Click(uIAccountIDEdit)) when executing the application we get the following error message:

"Failed to perform action on blocked control exception"

The thing is that we can handle the control, I mean, we find it using either the generated code or the AutomationId property and even can highlight it (using uIAccountIDEdit.DrawHighlight), but we cannot execute a click action or set a text to the control, for example, using the uIAccountIDEdit.Text property, cause we get the same error message.

I believe this strange behaviour is related to the RadDocumentPanes, but we tried a lot of things and we cannot avoid this error, so we cannot continue with the task.

Do you have any idea regarding this ?

Thanks,


这篇关于编码的UI测试 - 获取FailedToPerformActionOnBlockedControlException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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