1

我試圖通過Visual Studio 2010將UI測試自動化到我的Silverlight應用程序。我在我的應用程序上有一個dataPicker。當我正在播放錄製動作時,未選擇日期。Ui測試Silverlight控件datePicker

它會返回錯誤:

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; 

我做錯什麼了嗎?

+0

我記得在某處看到datepicker控件有已知的問題。儘管目前我似乎無法找到它的鏈接。 – stoj

回答

0

需要更多的代碼來回答你的問題,但實際上,但從異常,我可以建議你的代碼嘗試點擊datepicker日曆沒有實際顯示。 所以你必須添加一些代碼才能使datepicker出現,然後選擇日期。