Completed
Last Updated: 10 May 2014 11:59 by ADMIN
ADMIN
Cody
Created on: 21 Apr 2014 19:26
Type: Bug Report
3
KendoInput.InputValue throws exception
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

2 comments
ADMIN
Daniel Djambov
Posted on: 10 May 2014 11:59
Telerik: the issue is fixed and solution will be available in our next product release planned in May 2014.
Carl
Posted on: 21 Apr 2014 23:43
The KendoInput InputValue property throws an exception when a KendoNumericTextBox does not contain a value. This is caused by the javascript on the page trying to execute .toString() on a null result from .value(). You can replicate this on any of the demos by calling the Clear method prior to accessing InputValue.