繁体   English   中英

UI测试Silverlight Control datePicker

[英]Ui testing of Silverlight Control datePicker

我正在尝试使用Visual Studio 2010将UI测试自动化到我的Silverlight应用程序。我的应用程序上有一个dataPicker 我正在播放录音动作,未选择日期。

它返回错误:

Test method CriarRequisicao3.comparar5.CodedUITestMethod1 threw exception: 

Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException: 
Another control is blocking the control. Please make the blocked control visible and retry the action. 

Additional Details: 

TechnologyName:  'Silverlight'
ControlType:     'Button'
AutomationId:   'Button'

 ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F003"

The code that VS2010 generate for this step is:

// Select '18-Nov-2011' in 'dp_DesiredDate' date picker

uIDp_DesiredDateDatePicker.SelectedDateAsString = this.RecordedMethod14Params.UIDp_DesiredDateDatePickerSelectedDateAsString;

难道我做错了什么?

实际上,需要更多代码来回答您的问题,但是从例外情况来看,我可以建议您的代码尝试单击datepicker日历而不实际显示它。 因此,您必须添加一些代码以使datepicker出现,然后选择日期。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM