工具提示阻止编码的ui测试执行 [英] Tool tip blocking coded ui test execution

查看:97
本文介绍了工具提示阻止编码的ui测试执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经设置了每天两次在虚拟机上连续3小时运行的测试.

We have set of test running on virtual machine back to back for 3 hour twice a day.

可以观察到,由于VM上应用程序的响应/延迟过晚,因此在测试执行过程中的某个时间段

It is observed that sometime during test execution due to late response/latency of the application on VM- 

一个特定的按钮显示了一个很大的工具提示,该提示最终会阻止下一步操作(下面列出),从而导致测试方法失败.

one particular button displays a big tool tip which ultimately blocks the next action (listed below) which results in failure of testmethod.

我尝试了变通方法,例如移动鼠标光标,单击屏幕某处以摆脱工具提示,双击组合框

I tried workaround like moving the mouse cursor,clicking on some point of screen to get rid off of tooltip,double click on the combobox 

Error displayed is :  

测试方法 AutomatedUITest.CustomTests.ResLayersGeneralInputTests.ResLayersGeneralInputsBasicTest_Foray 引发异常:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException:测试 ResLayersGeneralInputsBasicTest_Foray在步骤79失败,操作 'EnterGeneralInputs'.错误消息:播放未能找到控件 具有给定的搜索属性.其他详细信息:
技术名称:'UIA'
ControlType:组合框"
名称:"TempCalcOptionsComboBox"
---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: 播放未能找到具有给定搜索属性的控件. 其他详细信息:
技术名称:'UIA'
ControlType:组合框"
名称:"TempCalcOptionsComboBox"
---> System.Runtime.InteropServices.COMException:错误HRESULT E_FAIL具有 < o:p></o:p>

Test method AutomatedUITest.CustomTests.ResLayersGeneralInputTests.ResLayersGeneralInputsBasicTest_Foray threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: Test ResLayersGeneralInputsBasicTest_Foray Failed at step 79, action 'EnterGeneralInputs'. Error Message: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'UIA'
ControlType: 'ComboBox'
Name: 'TempCalcOptionsComboBox'
---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'UIA'
ControlType: 'ComboBox'
Name: 'TempCalcOptionsComboBox'
---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.<o:p></o:p>

public void SetTemperatureComboBox(string value)
        {
           
            WpfComboBox tempComboBox = WpfControlFactory.CreateComboBoxControl(ReservoirLayersTemperatureView, "Name", "TempCalcOptionsComboBox");
            tempComboBox.WaitForControlReady(4000);
            Mouse.DoubleClick(tempComboBox);
            tempComboBox.SetFocus();
            Playback.Wait(1000);
            tempComboBox.SelectedItem = value;
        }

推荐答案

如果我对您的理解正确,则大工具提示会阻塞组合框,导致找不到组合框控件.请在没有经过编码的UI测试的情况下在应用程序上手动操作这些操作,我是否工具提示也将阻止 组合框控件导致组合框控件不可见?如果是,我认为需要优化此应用程序UI,则最好与开发团队联系以优化应用程序,并使工具提示不会阻塞组合框.

If I understand you correctly, the big tool tip blocked the combobox which caused the combobox control can’t be found well. Please operate these actions on the application manually without from a coded UI test, I whether the tool tip also will block the combobox control to cause the combobox control not visible? If yes, I think this application UI need be optimized, you had better contact the development team to optimize the application and make the tool tip not block the combobox.

如果应用程序UI不显示此类问题,则仅当您运行编码的UI测试时才会发生此问题,通常这种情况会引发FailedToPerformActionOnBlockedControlException,现在编码的UI报告找不到组合框控件,我对此表示怀疑 此问题是否真的是由控件阻止引起的,建议您在测试回放过程中移动鼠标光标或执行其他操作以消除工具提示,以使组合框可见,以检查是否会发生相同的问题或是否会出现问题. 去掉.如果即使组合框控件变得可见也将发生相同的错误,我怀疑组合框cotrol的那些搜索特性不足以找到该控件.请在搜索属性中添加更多属性,以检查结果.

If the application UI does not display such issue, this issue only occurred when you run coded UI test, generally such scenario throws FailedToPerformActionOnBlockedControlException, now Coded UI reports that the combobox control could not be found, I doubt whether this issue was really caused by the control blocking, I suggest you to move the mouse cursor or do other operations to eliminate the tooltip during test playback to make the combobox visible to check whether the same issue will occur or the issue will remove. If the same error will occur even though the combobox control becomes visible, I doubt those search proeprties of the combobox cotrol is not enough to find the control. Please add more proeprties to search proeprties to check the result.

谢谢


这篇关于工具提示阻止编码的ui测试执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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