FailedToPerformActionOnHiddenControl但是绘制突出显示和以前的使用找到控件 [英] FailedToPerformActionOnHiddenControl BUT draw highlight and previous uses find the control

查看:109
本文介绍了FailedToPerformActionOnHiddenControl但是绘制突出显示和以前的使用找到控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个奇怪的,

 我好像在第三个HtmlEdit框中有一个'未能对隐藏控制执行操作' IE8中的派对模式对话框。

 I seem to have one of the variety 'Failed to perform Action on Hidden Control' on an HtmlEdit box in a 3rd party modal dialog in IE8.

无论如何,它有点奇怪,我必须打开对话框,然后再次关闭它再打开它,否则控件识别非常慢。在此之后它会很好并且只有一个开口,直到我离开页面。

Its slightly odd anyway in that I have to open the dialog and then close it again and open it again else the control recog ia very very slow. After this its fine and a single opening will do till I navigate away from the page.

第一次通过对话框找到并修改控件的内容ok,然后关闭对话框并检查页面上的网页表格是否有变化。

The first pass through the dialog finds and mods the content of the control ok, I then close the dialog and check the web table on the page for changes.

然后我以与以前相同的方式重新打开对话框,现在无法在其中找到控件。 如果我在那一点重新启动测试它会找到控件,所以它听起来像
陈旧控件所以我尝试了findMatching控件,如果调试运行但是第二个它找到了控件即使找到了控件,它的时间也会再次失效。

I then reopen the dialog the same way as before and now the control can not be found in it.  If I restart the test at that point it finds the control so it sounds like a stale control so I tried the findMatching controls and yep it finds the control if you debug the run but the second time through it failes again even though the control is found.

此外,如果我在打开对话框后第一次暂停测试并关闭并再次打开对话框,那么测试就会失败在那时找到控件。

Also if I pause the test the first time through just after it opened the dialog and close and open the dialog again then the test failes to find the control at that point.

使用'Locate Control'检查UIwindow中的控件一直工作到顶部。

Checking the controls from the UIwindow with the 'Locate Control' works all the way up to the top.

我已经打开和关闭了智能匹配选项,并使用等待就绪和等待存在。

I have had Smart match options on and off and used Wait for Ready and Wait for Exists.

我已经在代码中输入了每个级别的"始终搜索"控制和控制之上是自我。

I have put in the code at verious points the 'always search' for each of the levels above the control and the control its self.

我试过延迟并手动踩控制和对话,以确保焦点在那里。

I have tried putting in a delay and manually cicking on the control and the dialog in that delay to make sure focus is there.

我重新录制了控件动作即双击和 单击以在失败时进行全选。它在UI地图中创建了一个新的控件,但参数都是相同的,并且它不起作用。

I have re-recorded the control action which is a Double click and  a click to make a select all at the point it fails. It creates a new control in the UI map but the parameters are all the same and it does not work.

我在同一个对话框上用另一个控件尝试了它,就像第一个操作一样。对话框和控件第二次打开时会发生同样的事情。

I have tried it with another control on the same dialog as the first action on the dialog and the same thing happens with that control the second opening.

我在论坛上绝对没有想法和搜索。

I have absolutly run out of ideas and searches on the forums.

I没有尝试手工制作一个新的控件,因为drawhighlight获得了正确的控制,并且顶部没有可见的控件(但是在测试尝试之前手动点击控件应该对该控件进行排序。   

I have not tried hand crafting a new control since the drawhighlight gets the correct control and there is no visible control on top ( but clicking on the control manually before the test tries to should have sorted that one.   

有没有人有任何想法,我必须遗漏一些东西...

Has anyone got any ideas, I must be missing something...

干杯

Ade

推荐答案

您可以尝试另外两个选项:

Two more options you can try out :

将SearchConfiguration"VisibleOnly"放到您要搜索的顶级窗口。



youTopLevelWindowControl.SearchConfigurations.Add(Se archConfiguration.VisibleOnly);
$


试用的最终选项是使用"OrderOfInvocation "搜索属性到顶级窗口
搜索类似于 -



youToplevelWindowControl.SearchProperties.Add("OrderOfInvocation","2");
$


这是做什么的,它寻找第二个桌面中类似属性的窗口实例。 (并且会忽略隐形陈旧窗口,如果确实存在的话)。

Have the SearchConfiguration "VisibleOnly" to the top level window which you are searching.

youTopLevelWindowControl.SearchConfigurations.Add(SearchConfiguration.VisibleOnly);

Final option to try out would be to use the "OrderOfInvocation" search property to the top level window search something like –

youToplevelWindowControl.SearchProperties.Add("OrderOfInvocation", "2");

What this does is, it looks for the second instance of the window of similar properties within the desktop. (and will ignore the invisible stale window, if indeed it exists).

谢谢,

~Tapas

注意:理想情况下,主要方法是修复应用程序,以便正确处理过时窗口。我上面提到的所有内容都是编码的UI测试方面的解决方法,以使场景正常工作。

Note: The primary approach ideally would be the fix the application so that the stale window is disposed off properly. All that I’ve mentioned above are workaround in coded UI test side to just get the scenario working.


这篇关于FailedToPerformActionOnHiddenControl但是绘制突出显示和以前的使用找到控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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