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

Javascript errors when handling dropdowns

8 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 12 Apr 2013, 09:28 PM
Lately I've started running into an ExecuteCommand failed error in a bunch of tests, only when running them on the test studio run time.

It only happens on web forms ajax dropdown control, as far as I can tell.

The error messages look like:

ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()',ClientId:'Client_344da513-6c50-4d7e-8c61-b129e4dee963',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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.


The test log messages is:


Failure Information:
~~~~~~~~~~~~~~~
ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()',ClientId:'Client_9e4e4fc8-fa84-485d-b8b7-1aefb61c62a7',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()',ClientId:'Client_9e4e4fc8-fa84-485d-b8b7-1aefb61c62a7',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0];var evt = document.createEvent(\'HTMLEvents\');evt.initEvent(\'change\',true,true);el.dispatchEvent(evt);}fireChanged()] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent'
   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)


I should also point out that the dropdown box is changed to the correct value

8 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 15 Apr 2013, 10:41 AM
Hi Jon,

I am sorry to hear you are experiencing this issue. This is a regression we recently found and fixed. The fix is included in our latest internal build 2012.2.1527. You can download it from your Telerik.com account here: Public URL.

I apologize for the inconvenience and please let me know whether the issue goes away after upgrading.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Jon
Top achievements
Rank 1
answered on 15 Apr 2013, 03:30 PM
It appears that build has fixed the error on my stand alone copy. My next round of automated tests will end in 6-10 hours so if I don't come back then all is good.

Thanks for the quick reply!
0
Naveen
Top achievements
Rank 1
answered on 10 May 2013, 11:15 AM
Is this fix available for Telerik Free testing Framework as well?
0
Accepted
Plamen
Telerik team
answered on 10 May 2013, 03:39 PM
Hi Naveen,

Yes the fix is included in our latest framework build 2012.2.1527. However I recently discovered that the issue still occurs in older versions of Internet Explorer(IE8 and older). The bug is logged here: Public URL. We expect a final fix for this to be included in our next official 2013 R1 release.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Alan
Top achievements
Rank 2
answered on 04 Sep 2013, 04:24 AM
Hi Plamen,

Could you please confirm that this issue has been fixed with the latest 2013 build?  I'm experiencing this issue when performing quick execution in IE9.  If not truly fixed, with the service pack fix this issue?

Thanks!
Alan
0
Vince
Top achievements
Rank 1
answered on 05 Sep 2013, 11:37 AM
Alan - good news and bad news.
Bad news: I'm still getting the same error too, so it looks like they haven't fixed it in the 2013 release.
Good news: I suspect the problem only affects IE9 if it is running in compatibility view mode i.e. acting as IE8. You might be able to work around it by running the browser in normal mode?
0
Cody
Telerik team
answered on 05 Sep 2013, 06:57 PM
Hello Alan,

Our investigation of this issue showed that there's a JavaScript error within the page itself. The JavaScript of that page needs to be fixed. There was no bug in Test Studio discovered that needed to be fixed.

If you have a new website you would like us to look at, in which you believe does not have a JavaScript error contained in it, we'll be glad to look at it. I recommend you create your own support ticket and help us reproduce the problem so we can study it.

Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Alan
Top achievements
Rank 2
answered on 18 Oct 2013, 01:20 PM
Sorry for the delayed response.  Vince, thanks for the help, however the website we test on forces IE9 to run in IE8 compatibility.  Cross Browser coding/testing is fairly new to our company so this was our solution in the meantime.

Thanks too, Cody.  A solution I found for now is to include the code ActiveBrowser.WaitUntilReady(); but I will keep an eye and see if this is the solid solution.

Alan
Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Jon
Top achievements
Rank 1
Naveen
Top achievements
Rank 1
Alan
Top achievements
Rank 2
Vince
Top achievements
Rank 1
Cody
Telerik team
Share this question
or