【问题标题】:Ui testing of Silverlight Control datePickerSilverlight Control datePicker的UI测试
【发布时间】:2011-11-18 17:49:56
【问题描述】:

我正在尝试使用 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;

我做错了吗?

【问题讨论】:

  • 我记得在某处看到日期选择器控件存在已知问题。不过,我目前似乎找不到它的链接。

标签: c# visual-studio-2010 silverlight datepicker coded-ui-tests


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-27
    • 2017-01-01
    • 1970-01-01
    • 2012-04-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-27
    相关资源
    最近更新 更多