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

ExecuteCommandException detached the context from the active browser

1 Answer 25 Views
Silverlight WebAii RadControls
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Max
Top achievements
Rank 1
Max asked on 24 May 2017, 03:53 PM

Good day.
The problem is the following. I have a few Viewa on the page and each has an indicator.

I'm waiting for the download to finish with the following code:

var indicatorList = Page.BusyIndicatorList;

foreach (var indicator in indicatorList.Where(indicator => indicator != null && indicator.IsVisible && indicator.IsBusy))
                {
                    indicator.Wait.Timeout = WaitBusyIndicatorTimeout;
                    indicator.Wait.For(_ => _.As<RadBusyIndicator>().IsBusy == false);
                }

(Checked in the console:

indicatorListCount: 7

indicator: <RadBusyIndicator BaseType='ContentControl' Uid='44272189'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='36381863'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='24209184'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='21613818'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='33286939'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='3456112'>
indicator: <RadBusyIndicator BaseType='ContentControl' Uid='43296649'>

)

On some elements on the line indicator.IsBusy throw the exception ExecuteCommandException. I intercept it, but the code does not work anymore, because this Exception detached the context from the active browser. And I can not access the browser.

StackTrace:

at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetVisibility(IAutomationPeer peer)
   at ArtOfTest.WebAii.Silverlight.FrameworkElement.get_Visibility()
   at ArtOfTest.WebAii.Silverlight.FrameworkElement.get_IsVisible()
   at OneInc.AppOne.TestingFramework.Action.<Wait>b__0(RadBusyIndicator indicator) in ... :line 39
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()

Before exception:

App.Manager.ActiveBrowser.ClientId = Client_f61cf793-5b72-48d1-b9df-239095c1cca7;

After exception:

App.Manager.ActiveBrowser.ClientId =null;

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 29 May 2017, 12:39 PM
Hi Max,

Thanks for all details shared. 

Please share your project for further inspection since it is not clear enough if this is a test or the application throws that exception. Thanks! 

Regards,
Elena Tsvetkova
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Silverlight WebAii RadControls
Asked by
Max
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or