Silverlight控件datePicker的UI测试
我正在尝试使用 Visual Studio 2010 对我的 Silverlight 应用程序进行自动化 UI 测试。我的应用程序上有一个 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;
我做错了什么吗?
I'm trying to automate UI tests to my Silverlight App with Visual Studio 2010. I have one dataPicker
on my app. Whem I'm playing the recording actions, the date is not selected.
It returns the error:
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;
Am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,需要更多代码来回答您的问题,但从例外情况来看,我可以建议您的代码尝试单击日期选择器日历,而不实际显示它。
所以你必须添加一些代码来让日期选择器出现,然后选择日期。
Need more code to answer you question, actually, but from the exception I can suggest that your code tries to click on datepicker calendar without actually having it shown.
So you must add some code to make datepicker appear, and then select date.