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

Data driven test on Firefox gives Exception has been thrown by the target of an invocation after a few iterations

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Brian asked on 21 Aug 2013, 12:57 AM
  I'm currently running Test Studio 2013.1 on Visual Studio 2012 Ultimate Update 2. This issue only happens in Firefox (v21.0), Internet Explorer and Chrome work fine. When I try to run my data driven test, usually about the 3rd to 5th iteration, when it goes to start the next iteration I get the below error and the browser itself stays up with the last page from the prior iteration:

System.Reflection.TargetInvocationException occurred
  Message=Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
  InnerException: System.Runtime.InteropServices.COMException
       Message=Object is not connected to server (Exception from HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED))
            at Accessibility.IAccessible.get_accName(Object varChild)
            at MS.Internal.AutomationProxies.Accessible.GetName(IAccessible acc, Int32 idChild)
            at MS.Internal.AutomationProxies.Accessible.Compare(IAccessible acc, Int32 idChild)
            at MS.Internal.AutomationProxies.Accessible.SetAccessibleChildrenIndexAndGetChildren(IAccessible parent)
            at MS.Internal.AutomationProxies.MsaaNativeProvider.System.Windows.Automation.Provider.IRawElementProviderFragment.GetRuntimeId()
            at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
            at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
            at MS.Internal.Automation.UiaCoreApi.CheckError(Int32 hr)
            at MS.Internal.Automation.UiaCoreApi.UiaNavigate(SafeNodeHandle hnode, NavigateDirection direction, Condition condition, UiaCacheRequest request)
            at System.Windows.Automation.AutomationElement.Navigate(NavigateDirection direction, Condition condition, CacheRequest request)
            at System.Windows.Automation.TreeWalker.GetFirstChild(AutomationElement element)
            at ArtOfTest.Common.Extensions.AutomationExtensions.GetControlChildrenCount(AutomationElement element)
            at ArtOfTest.WebAii.Win32.Dialogs.FirefoxAlertDialogMatch..ctor(AutomationElement dialog)
            at ArtOfTest.WebAii.Win32.Dialogs.AlertDialog.MatchesUIAutomationElement(AutomationElement element)
            at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.<>c__DisplayClass8.<FindUIAEDialog>b__5(IDialogUIAutomation d)
            at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
            at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.FindUIAEDialog(AutomationElement element)
            at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.HandleElement(AutomationElement element)
            at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.AutomationEvent_OnStructureChanged(Object sender, StructureChangedEventArgs e)

Is there anything I could have done to cause this or is this a defect?

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 23 Aug 2013, 09:48 PM
Hi Brian,

Thank you for contacting Telerik. I haven't seen this behavior. In order for us to help you, we need to reproduce this issue locally. Please attach a copy of your project, data source and access to your application. If providing access to your application isn't  possible please provide us with a demo data source and application.

The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question