Completed
Last Updated: 05 Apr 2013 12:06 by Cody
ADMIN
Cody
Created on: 11 Mar 2013 17:30
Type: Bug Report
0
Wait For RadComboBoxItem index fails with a JavaScript error
Customer has a test with a "Wait For Text = xxxx" test step. The test always fails with this JavaScript error:

'3/6/2013 11:12:42 AM' - 'Fail' : 10. Wait Until Current First Name Appears in Field - DataDriven: [$(FirstName)]
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Unexpected error while waiting on condition. Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [document.getElementsByTagName(\'input\')[9].value] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'value': 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:'document.getElementsByTagName(\'input\')[9].value',ClientId:'Client_7bfd5e8b-b44d-4ca3-a294-76220d541d56',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'2',InError:'True',Response:'System.InvalidOperationException: Javascript call [document.getElementsByTagName(\'input\')[9].value] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'value': 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.ObjectModel.Element.GetValue[T](String propertyName, T defaultValue)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.InputValueVerificationDescriptor.ExtractData(IAutomationHost targetBrowser, DescriptorValueStore dataStore)
   at ArtOfTest.Common.Design.Extensibility.Descriptors.VerificationDescriptor.<PerformWait>b__0(IAutomationHost hst, DescriptorValueStore values)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
1 comment
Cody
Posted on: 01 Apr 2013 19:22
Upon further investigation I discovered that the customer has customized the RadComboBox used in his application. Our translator is unable to handle the customization (which is a Test Studio bug). You can overcome the problem by replacing the RadComboBoxItem Wait For xxxx test steps with simple Wait for TextContext test steps.