Using this webpage http://demos.telerik.com/kendo-ui/web/numerictextbox/index.html, code like this will throw an exception:
KendoInput PriceInput = ActiveBrowser.Find.ByExpression<KendoInput>("id=add-product", "|", "tagIndex=span:0");
PriceInput.Clear();
Log.WriteLine(PriceInput.InputValue);
The exception thrown is:
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[WebTest1_CodedStep3] : KendoInputvalue '18.05' entered with Clear'.
InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [$(\"#currency\").data(\"kendoNumericTextBox\").value().toString()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get property 'toString' of undefined or null reference
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:'$(\"#currency\").data(\"kendoNumericTextBox\").value().toString()',ClientId:'Client_288fb0ad-9b00-4d07-b673-2781785b57be',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [$(\"#currency\").data(\"kendoNumericTextBox\").value().toString()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get property 'toString' of undefined or null reference
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.
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.TestingFramework.Controls.KendoUI.KendoInput.get_InputValue()
at TestStudioProject3.WebTest1.WebTest1_CodedStep3() in E:\Users\Dad\documents\visual studio 2010\Projects\TestStudioProject3\TestStudioProject3\WebTest1.tstest.cs:line 92