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:
The test log messages is:
I should also point out that the dropdown box is changed to the correct value
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