Completed
Last Updated: 08 Nov 2013 08:12 by ADMIN
ADMIN
Plamen
Created on: 05 Feb 2013 16:34
Type: Bug Report
0
InvalidOperationException when selecting from HTML Select element by index.
I am having some problems selecting from a HTMLselect element by index, every time I try and run a test containing a step that selects by index (and only when selecting by index) the test runs up until the select by index step, the test successfully selects the option by index (the element is updated with the correct value in the web page) but the test then fails, see log below for error details. I have tried using a coded step to select by index and that also gets the same error.
 
Failure Information: 
~~~~~~~~~~~~~~~
 ExecuteCommand failed!
 InError set by the client. Client Error:
 System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   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:'function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()',ClientId:'Client_23244bfe-dfe4-4400-a60e-ea5d31981768',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   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.
 
InnerException:
 ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
 InError set by the client. Client Error:
 System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   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:'function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()',ClientId:'Client_23244bfe-dfe4-4400-a60e-ea5d31981768',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   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.HtmlSelect.InvokeOnChange()
    at ArtOfTest.WebAii.Controls.HtmlControls.HtmlSelect.SelectByIndex(Int32 index, Boolean invokeOnChangeEvent)
    at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SelectDropDownActionDescriptor.Execute(Browser browser)
    at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
    at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)




1 comment
ADMIN
Pavel
Posted on: 20 Feb 2013 13:17
The issue is resolved and the fix will be available in the 2012 R2 SP2 relase, scheduled for this week.