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

IE9 and ActiveBrowser generates error in execution.

3 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 19 Dec 2012, 07:59 PM
I am running into an error on a simplistic use of ActiveBrowser that I cannot figure a way around.     

ActiveBrowser.RefreshDomTree();
  
FramesCollection framesCollection = ActiveBrowser.Frames;
  
int frameIndexWithSLApp = GetFrameIDwithSilverlightApp(framesCollection);
  
SilverlightAppsList listOfSLApps = framesCollection[frameIndexWithSLApp].SilverlightApps();
  
SilverlightApp SLApp = listOfSLApps[0];
The problem I am running into is that when the ActiveBrowser goes to Refresh the DOM the following error is received.  I can say the error seems to be intermittent and not reproducible every time. 

ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_f0ec5086-cf9c-44b0-b74f-ae9735ccfad7',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.InvalidOperationException: This client 'Client_f0ec5086-cf9c-44b0-b74f-ae9735ccfad7' is not connected to remote to be able to process command.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
---> System.InvalidOperationException: This client 'Client_f0ec5086-cf9c-44b0-b74f-ae9735ccfad7' is not connected to remote to be able to process command.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
--- End of inner exception stack trace ---
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.RefreshDomTree()
at Aprimo.Automation.Watin.Controllers.Concepts.Tools.WebAiiController.GrabSilverLightApp()

In addition to this exception I log a couple extra pieces of data:
What that ActiveBrowser.ClientId  and any open browsers the Manager sees.

ActiveBrowser ClientID: Client_14db7f05-c8e0-4b5d-adc0-f7581daef23a
Client_14db7f05-c8e0-4b5d-adc0-f7581daef23a - https://app.w.qa.marketingstudio.com/aprimoapp.aspx

Looking at the logging information I notice that the ActiveBrowser ClientID and the Manager's Open Browsers match up.  However, in the exception the ClientID is not matched. 

A little background on this test:
I have also ran tests against IE8 and IE9 and this error is only generated when running in IE9.  This occurred on both a 32 and 64 bit Windows 7 machines.  
We are using the build: Telerik_Testing_Framework_2012_2_1204_FREE_EDITION
During the execution, our web application generates popups (also browser pages) that appear, but I handle them with different code, Is it possible the ActiveBrowser switches to those, but when they are closed it doesn't switch back completely or possibly cached?

Any thoughts on this?

Thanks,

Will

3 Answers, 1 is accepted

Sort by
0
Will
Top achievements
Rank 1
answered on 19 Dec 2012, 08:23 PM
I also forgot to include,    My class is a derived class from the base class BaseTest in ArtOfTest.WebAii.TestTemplates.   In addition before going up to 2012 version  we had utilized the PurgeZombieBrowsers method.  I don't know if this has any impact as well?
0
Will
Top achievements
Rank 1
answered on 20 Dec 2012, 05:51 PM
After attempting to play with this more I came across a little more that is interesting.   I placed the following code to help in my suite.

Browser usedPage = ActiveBrowser;
 
usedPage.RefreshDomTree();

So in my error I wanted to capture more information about each object and here is what I received:

ActiveBrowser ClientID: Client_4a7d08ca-8aa6-466c-8b0c-0b4f7266e06a
Used Browser ClientID: Client_01405b8f-3887-43b2-aa0f-20dd1928ef48
Manager.Browsers: 1 of 1 - Client_4a7d08ca-8aa6-466c-8b0c-0b4f7266e06a - https://app.w.qa.marketingstudio.com

As you can see,  I expected my usedPage Browser object to match the ActiveBrowser and the only open Browser in Manager.  It's almost as if the ActiveBrowser doesn't FULLY revert back to the Browser I expect it to. 
0
Stoich
Telerik team
answered on 25 Dec 2012, 04:06 PM
Hello William,
it seems that your website is publicly accessible. Could you please go ahead and send us your entire Test Project. I will run your test against the application and hopefully I will see be able to reproduce the issue for myself.

Unfortunately the exception message is vague and I cannot effectively assist without reproduce the issue locally.

Hope to hear from you soon.

All the best,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Will
Top achievements
Rank 1
Answers by
Will
Top achievements
Rank 1
Stoich
Telerik team
Share this question
or