无法执行具有值\"somedropdownValue \"的"SelectedItem的SetProperty"在隐藏的控件上. [英] Cannot perform 'SetProperty of SelectedItem with value \"somedropdownValue\"' on the hidden control.

查看:106
本文介绍了无法执行具有值\"somedropdownValue \"的"SelectedItem的SetProperty"在隐藏的控件上.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CodedUI为WPF应用创建测试.

I am using CodedUI to create Test for my WPF app.

在选择下拉列表值时间歇性地针对某些下拉列表获取以下错误消息:

Getting following error message intermittently for some dropdowns while selecting dropdown values:

{"无法执行"SelectedItem的SetProperty具有值\" Tube \""在隐藏的控件上.其他详细信息:\ r \ n技术名称: 'UIA'\ r \ nFrameworkId: 'WPF'\ r \ nControlType: 'ComboBox'\ r \ nMaxDepth: '1'\ r \ n'}

{"Cannot perform 'SetProperty of SelectedItem with value \"Tube\"' on the hidden control. Additional Details: \r\nTechnologyName:  'UIA'\r\nFrameworkId:  'WPF'\r\nControlType:  'ComboBox'\r\nMaxDepth:  '1'\r\n"}

在鼠标单击UITestControls以及设置复选框的选中属性时,我遇到了类似的问题.那个时候我通过使用UITestControl.bounding矩形并单击矩形的中心来解决了这个问题(尽管我不太喜欢这种解决方案)

I had faced similar issues for mouse clicks on UITestControls and while setting checkbox's checked properties. That Time I solved it by using UITestControl.bounding rectangle and clicking in center of rectange(though i dodnt like this solution much)

现在,从下拉列表中选择值时,我无法找到解决此问题的任何方法.

Now In the case of Selecting values from dropdowns, I am not able to figure out any solution for this problem.

此外,因为我正在使用以下代码,所以没有多个UI控件的问题:

Also, There is no issue of multiple UI controls, as I am using following code:

WpfComboBox TypeDropDown = (WpfComboBox)(row.GetChildren()[4].GetChildren()[0]);//Row->TypeDropdownCell->TypeDropDown           

TypeDropDown.WaitForControlReady(); 

TypeDropDown.WaitForControlReady(); 

TypeDropDown.SelectedItem =下拉列表中的某些值";

TypeDropDown.SelectedItem = "some value from dropdown list";


我也尝试设置alwaysSearch = True,但这对我也不起作用.

I tried setting alwaysSearch=True also, but that too also didnt work for me.

我可以清楚地看到UI中的下拉菜单,但不知道为什么CodedUI无法显示.

I can clearly see the dropdown in my UI but dont know why CodedUI can't.

此外,如果尝试使用DrawHighlight(),则看不到任何突出显示的控件.

Also, If I try to DrawHighlight(), I can't see any Control Highlighted. 

我正在32位win-7 sp1 VM上使用codedui 2012.

I am using codedui 2012 on a 32 bit win-7 sp1 VM.

请指导我进行测试的方法.

Pls guide me some way to proceed with my Test.

请注意,该问题是随机的和间歇性的

Pls note that the issue is random and intermittent

推荐答案

您好,ShrutiS,

Hi ShrutiS,

您能和我分享一个关于真实用户界面的屏幕截图吗?是默认的WPF控件还是自定义控件?

Could you share me a screen shot about the real UI? Is it the default WPF controls or custom controls?

>>另外,如果我尝试使用DrawHighlight(),则看不到任何突出显示的控件.

>>Also, If I try to DrawHighlight(), I can't see any Control Highlighted. 

通常,它会在UI测试控件周围绘制一个蓝色矩形,如果没有,您是否可以在UI中看到该蓝色矩形?也许它发现您的搜索属性或其他控件有错误的控制.

Generally it draws a blue rectangle around the UI Test Control, if not, could you see the blue rectangle in your UI? Maybe it find a wrong control with your search property or others.

您是否安装了VS2012 update4?如果您使用VS2012,也请安装此最新软件包.

Did you install the VS2012 update4? Please also install this latest package if you use the VS2012.

>> {"无法执行具有值\"Tube \"的"SelectedItem的SetProperty"在隐藏的控件上.其他详细信息:\ r \ n技术名称: 'UIA'\ r \ nFrameworkId: 'WPF'\ r \ nControlType: 'ComboBox'\ r \ nMaxDepth: '1'\ r \ n"}.

>>{"Cannot perform 'SetProperty of SelectedItem with value \"Tube\"' on the hidden control. Additional Details: \r\nTechnologyName:  'UIA'\r\nFrameworkId:  'WPF'\r\nControlType:  'ComboBox'\r\nMaxDepth:  '1'\r\n"}.

我们必须确保它不是IE更新( KB2870699 )问题.

We have to make sure that it is not the IE update (KB2870699) issue. 

参考:

最好的问候,

Jack


这篇关于无法执行具有值\"somedropdownValue \"的"SelectedItem的SetProperty"在隐藏的控件上.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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