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

How to attach existing Browser ?

4 Answers 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sivaraj
Top achievements
Rank 1
sivaraj asked on 02 Aug 2011, 12:49 PM
Hi,

Do we have an approach to attach an existing IE (or any other browser) instance which is not lunched by WebAii ?  I am using WebAii version 2011.1.609.0. I am not able to find the methods. Could you please share code snippet or work around to attach the existing browser.

Thanks in advance.

Regards,
Siva

4 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 03 Aug 2011, 03:50 PM
Hi Sivaraj,

Currently we do not have the ability in the framework to connect to an already opened browser. It is mandatory that it open a new browser in order to control it. We'd like to better understand your need for such a feature. Can you explain how having such a feature aid in your test automation?

I hope to here from you soon!

Regards,
Plamen
the Telerik team
Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Stanislav
Top achievements
Rank 1
answered on 06 Jun 2012, 11:50 AM
Hello Plamen,

So, how to handle the case, when we need to attach to just new opened browser window after clicking on the link?

Stas.
0
Naveen
Top achievements
Rank 1
answered on 06 Jun 2012, 08:39 PM
"Browsers" Collection should have all open browser info, provided it is opened from webaii.

0
Plamen
Telerik team
answered on 08 Jun 2012, 11:40 AM
Hello Stanislav,

Here's sample code:
// Set new browser tracking to enabled.
// This will make all new browser instances connect to
// the Manager.
Manager.SetNewBrowserTracking(true);
 
// Invoke the popup
Actions.Click(mylink);
 
// Wait for the new browser instance to connect.
Manager.WaitForNewBrowserConnect("google.com", true, 3000);
 
// disable new browser tracking
Manager.SetNewBrowserTracking(false);
As Naveen said, when the browser tracking is enabled, any new browser launched will be automatically added to the "Browsers" collection.

Please see this article for more information.

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