This is a migrated thread and some comments may be shown as answers.

Problems with test using RadTimeView to select time

5 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 14 Feb 2011, 11:35 AM
Hi

i have a test case where i need to set a date and time in a DateTime field (Rad control)

when i try to run the test it fails with the Log message (added to the end of this post).

what i can gather from the log is that something in get_culture() fails for some reason.
the object in the test states that culture is da-DK
and the Selected time format is DD-MM-YYY HH:MM

also the Element find logic is: "[id 'Contains' ctl18_timeView] AND [id 'Contains' ctl00] AND [tagname 'Exact' div]"

the Client and webpage is set to da-DK as culture or system language.


----- Log Message -----
ArtOfTest.Common.Design.Exceptions.ExecutionException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [$find(\'ctl00_m_g_0a5cf375_559d_4468_867e_757ee28215ec_ctl18_timeView_wrapper\').get_culture()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'null' is null or not an object
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'$find(\'ctl00_m_g_0a5cf375_559d_4468_867e_757ee28215ec_ctl18_timeView_wrapper\').get_culture()',ClientId:'Client_a4d5e5d3-5f23-44cc-94ee-a67dc39369a1',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [$find(\'ctl00_m_g_0a5cf375_559d_4468_867e_757ee28215ec_ctl18_timeView_wrapper\').get_culture()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'null' is null or not an object
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
 ---> ArtOfTest.WebAii.Exceptions.ExecuteCommandException
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.InvokeScript(String script)
   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.InvokeScript(String script)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.GetValue[T](String propertyName, T defaultValue)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.CallMethod[T](String methodCall, T defaultValue)
   at Telerik.WebAii.Controls.Html.RadTimeView.get_Culture()
   at Telerik.WebAii.Controls.Html.RadTimeView.SelectTime(DateTime selectedTime)
   at Telerik.WebAii.Design.Translators.Html.Calendar.TimeViewSelectionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
   --- End of inner exception stack trace ---

5 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 14 Feb 2011, 12:53 PM
Hi Benjamin,

Can you reproduce the problem with a control containing the following markup:
<telerik:RadTimePicker ID="TimePicker1" runat="server" Culture="da-DK"></telerik:RadTimePicker>
In my local tests against this control, the time selection from the TimeView is recorded and executed as expected. Please let me know what is necessary to replicate the error.

Greetings,
Pavel
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Benjamin
Top achievements
Rank 1
answered on 14 Feb 2011, 03:32 PM
ok on further investigation then we found the following.

your code snipit + the acual control that the dev used is included in this post and works as expected.

when testing further on the page where the error ocured and sliming down the configuration of the field we found the following results.
sharepoint2010. Danish Page, da-DK Danish Culture resulted in a failure.
sharepoint2010. Danish Page, en-US American Culture. works
sharepoint2010. English Page, en-US American Culture. works

0
Pavel
Telerik team
answered on 14 Feb 2011, 05:11 PM
Hello Benjamin,

I tried to reproduce this on a page with danish culture, but it still works on my end. Can you please confirm whether you can replicate the error on a page which is not in SharePoint?

Greetings,
Pavel
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Benjamin
Top achievements
Rank 1
answered on 17 Feb 2011, 08:25 AM
sorry for the delay in replying back to you

the issue can only be replicated in Sharepoint.

/Ben
0
Benjamin
Top achievements
Rank 1
answered on 17 Feb 2011, 11:46 AM
ok problem is solved it was the element search pattern that  found more then 1 element and selected the first one so that resulted in a error.

/Ben
Tags
General Discussions
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Benjamin
Top achievements
Rank 1
Share this question
or