I have a drop down while selecting the drop down i am facing below java script exception, i could not find what was the reason behind this test case failure.
See the below log for the reference:
'23-01-2013 15:27:35' - 'Pass' : 11. Wait for '3000' msec.
'23-01-2013 15:27:36' - 'Fail' : 12. Select 'ByText' option 'Main Phone' on 'Selector11Select'
------------------------------------------------------------
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: TypeError: Unable to get value of the property 'target': object is null or undefined
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_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',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: TypeError: Unable to get value of the property 'target': object is null or undefined
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: TypeError: Unable to get value of the property 'target': object is null or undefined
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_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',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: TypeError: Unable to get value of the property 'target': object is null or undefined
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.SelectByText(String text, 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)
Can you please guide me what can be done to make the test case work?
See the below log for the reference:
'23-01-2013 15:27:35' - 'Pass' : 11. Wait for '3000' msec.
'23-01-2013 15:27:36' - 'Fail' : 12. Select 'ByText' option 'Main Phone' on 'Selector11Select'
------------------------------------------------------------
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: TypeError: Unable to get value of the property 'target': object is null or undefined
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_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',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: TypeError: Unable to get value of the property 'target': object is null or undefined
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: TypeError: Unable to get value of the property 'target': object is null or undefined
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_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',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: TypeError: Unable to get value of the property 'target': object is null or undefined
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.SelectByText(String text, 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)
Can you please guide me what can be done to make the test case work?