Completed
Last Updated: 17 Jul 2015 05:18 by Scott
ADMIN
Cody
Created on: 05 Sep 2013 22:45
Type: Bug Report
1
Intermittently Element.Wait.WaitForExistsNot will fail with System.Reflection.TargetInvocationException
Intermittently (every 1 in 10, or 1 in 20 runs.  I'm using 2012.2..1317) the code Element.Wait.WaitForExistsNot will error out with this:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Refresh() failed due to an unexpected exception. ---> ArtOfTest.WebAii.Exceptions.FindException: Find Details:
- No FindParams defined.
- Start Element: [Element: 'html:0']
- Search log during Find:
Searching for element starting at '[Element: 'html:0']' 
Using FindParam: 
 [Find logic: Use 'TagIndex' where tag 'title' has index '0' and (none) ]
Element found is: '[Element: 'title:0']'
Attributes validation PASSED!
Validating tag name passed as part of the FindParam.
Element identification and validation succeeded!
 
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   --- End of inner exception stack trace ---
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh(Boolean forceDomTreeRefresh)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ArtOfTest.Common.WaitAsync.CallRefreshIfNeeded[T](T target)
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.WebAii.Synchronization.Wait.ForCondition(Func`3 condition, Boolean invertCondition, Object custom, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.WebAii.Synchronization.Wait.ForExistsNot(Int32 timeout)
   at Ratecard_Episode.OrigRepeatBoth.WaitForResults() in
7 comments
Scott
Posted on: 17 Jul 2015 05:18
I am also getting this issue intermittently tis a real time waster!!

Please fix this issue, or post a response to tell us how to avoid it.

Regards,

Scott
N1t1nA
Posted on: 13 Feb 2015 07:48
I am getting this same issue, Please Open this issue as this issue appears randomly in any  script [7 out of 10]. Silverlight app

'2/13/2015 7:28:57 AM' - LOG: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Refresh() failed due to an unexpected exception. ---> ArtOfTest.WebAii.Exceptions.FindException: Find Details:
- No FindParams defined.
- Start Element: [Element: 'html:0']


   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   --- End of inner exception stack trace ---
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh(Boolean forceDomTreeRefresh)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ArtOfTest.Common.WaitAsync.CallRefreshIfNeeded[T](T target)
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam) 
Ryan
Posted on: 16 Jan 2015 18:09
I was having a similar problem and I think the solution is worth a try here.

The problem occurred when I was using htmlControl.WaitForNotExists(htmlFindExpression).
The element would be removed, but Telerik was always throwing the following exception:
ArtOfTest.WebAii.Exceptions.FindException: Find Details:- No FindParams defined.- Start Element: [Element: 'html:0']

The solution that worked for me was to set Manager.ActiveBrowser.AutoDomRefresh to true.
Try something like this: 

Initialize(settings);
        
Manager.LaunchNewBrowser();
Manager.ActiveBrowser.Window.Maximize();
Manager.ActiveBrowser.NavigateTo("Wherever you want to go");
Manager.ActiveBrowser.AutoWaitUntilReady = true;
Manager.ActiveBrowser.AutoDomRefresh = true;
ADMIN
Konstantin Petkov
Posted on: 13 Oct 2014 06:14
Unfortunately no, we got no local repro to work on. Please contact the support team if you haven't done already with any details you cam share. Thanks!
Scott
Posted on: 13 Oct 2014 04:12
I am getting this same issue.  Was it resolved and if so how?
ADMIN
Konstantin Petkov
Posted on: 30 Sep 2013 11:47
I have to close the item. Please contact the support team in case we can have access to the application to replicate the error locally.

Thank you!
ADMIN
Konstantin Petkov
Posted on: 18 Sep 2013 12:50
Hello,

I'm sorry but we really need to replicate this case locally in order to troubleshoot the problem. The exception is quite specific to shoot in the dark against.

Thanks!