Silverlight控件datePicker的UI测试

发布于 2024-12-17 06:29:53 字数 885 浏览 6 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

oО清风挽发oО 2024-12-24 06:29:53

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文