Friday, September 7, 2012

Ui testing of Silverlight Control datePicker

Ui testing of Silverlight Control datePicker

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?

Answers & Comments...

Answer: 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.

by : Iaroslav Kovtunenkohttp://stackoverflow.com/users/532647




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog