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

Attaching to existing Browser

17 Answers 284 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Diwakar
Top achievements
Rank 1
Diwakar asked on 12 Apr 2010, 07:58 AM
Hi,

Is there a way to attach an existing IE (or any other browser) instance through the automation code ? I was using the Telerik.WebAii library and was unable to find any method to do this. Please do let me know if there is a way to do it ?

Regards,
Diwakar Gupta.

17 Answers, 1 is accepted

Sort by
0
Accepted
Missing User
answered on 12 Apr 2010, 01:33 PM
Hi Diwakar,

Thanks for the post and question. Unfortunately, the WebAii Framework currently does not have the ability to connect to an existing browser instance.

It can only connect to browsers, popups or Win32 dialogs that are launched via the framework test code. We are looking to add this feature in a future version of the product, thanks for your feedback.

Regards,
Nelson Sin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Diwakar
Top achievements
Rank 1
answered on 12 Apr 2010, 01:57 PM
Thank you for clarifying this aspect Nelson. Will wait for the feature in the future releases.

Diwakar.
0
Carlos Marcão
Top achievements
Rank 2
answered on 07 Jun 2010, 03:00 PM
Hello.

Which versions are you talking about 1.1? Or both versions don't support this feature?

Thanks,
Carlos Marcão
0
Cody
Telerik team
answered on 07 Jun 2010, 04:50 PM
Hi Carlos,

At this time all versions. No released version of the WebAii framework has the ability to connect to and control an already open browser window.

Regards,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
venkatesen
Top achievements
Rank 1
answered on 14 Jun 2010, 01:07 PM
Hi Team,
I am also looking for this feature. Please keep us informed once this is added to WebAii.
Is there any workarounds for this?

0
Cody
Telerik team
answered on 14 Jun 2010, 09:24 PM
Hi venkatesen,

Thanks for the input. For our own understanding, can you please explain how/why this feature is useful or needed for your testing?

Unfortunately at this time there is no workaround. We will update this thread when this feature becomes available to the public. It is in development now and will be released in a not too distant future version.

Sincerely yours,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Diwakar
Top achievements
Rank 1
answered on 15 Jun 2010, 06:27 AM
Hi,

While automating a web application, when a click or event on the existing web page opens a new browser then attaching to this new browser becomes a problem.

Regards,
Diwakar Gupta.
0
venkatesen
Top achievements
Rank 1
answered on 15 Jun 2010, 06:44 AM
Hi Team,
To add a Point to Diwakar's, if your application has embedded IE then you have this issue too.
I have applications with Embedded IEs. In this case only the parent will get recognised.
There are situations were in pop-up IE windows are opened automatically which is not opened via WebAii.


0
Cody
Telerik team
answered on 15 Jun 2010, 04:23 PM
@venkatesen,

Thank you for the feedback. Yes I can see the need for the ability to attach to an existing browser when you have an embedded IE browser in some sort of desktop application. I appreciate the input as to why/how this is important to you.

@Diwakar

We have code in the framework now that will detect a new browser window opening and automatically attach to it to automate it (such as clicking on a link that opens a new window). Granted this code only works when the framework launched the main window and is controlling the main window. Is this code not working for you? Or is there a different scenario we haven't covered in our code?

Greetings,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Diwakar
Top achievements
Rank 1
answered on 16 Jun 2010, 01:03 PM
Hi Cody,

Thank you for letting me know about the addition of this feature in the WebAii framework. As of now i am not using it for automation, currently in a windows automation project. Will see it when i move back to some web application automation.

Regards,
Diwakar.
0
Cody
Telerik team
answered on 16 Jun 2010, 10:28 PM
Hi Diwakar,

Ok, sounds good. Thanks for letting me know.

Regards,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Egor
Top achievements
Rank 1
answered on 09 Sep 2010, 12:06 PM
Hello!
I have read this thread, but I have the same question - is this feature will be supported in new versions?
My situation:
We have a site with the mandatory login procedure (if u run new browser instance - u must enter login\password).
And we have many UI tests in chain.
So when i need to run the second test, i must open a new browser and login once again. it is not possible due to some circumstances
So if first test leave browser window open, is there a way to try the second test reusing it?
0
Konstantin Petkov
Telerik team
answered on 10 Sep 2010, 03:54 PM
Hi Egor,

This feature is currently available in WebUI Test Studio. You can check this video for details.

I'll log a feature request to expose it for the framework as well but it will probably be limited to attaching to the IE only (note, we don't support recording in Firefox or any other browser except IE).

Kind regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sowjanya vunnava
Top achievements
Rank 1
answered on 24 Sep 2012, 09:45 AM
Hi telerik,

Telerik framework is not able to recognize the new browser conenct after performing click action and handling the alert dialog.
Below is the sample.
manager.SetNewBrowserTracking(true);
            manager.DialogMonitor.Start();
            AlertDialog dlg = new AlertDialog(manager.ActiveBrowser, DialogButton.OK);
            manager.DialogMonitor.AddDialog(dlg);
            ONEEMSElements.GetInstance.ctrl_PortalLinkIncase.Click(true);
                       
              manager.WaitForNewBrowserConnect("url", true, 120000);

When i get the browser count, it always gives me 1 instead of 2 and i'm not able to get ahndle for new browser window by any other means
Can you help me?
Regards
Sowjanya
0
Plamen
Telerik team
answered on 26 Sep 2012, 10:13 AM
Hello Sowjanya,

Looking your code, you have only one Click step:
ONEEMSElements.GetInstance.ctrl_PortalLinkIncase.Click(true);

What happens when that Click is performed? This will trigger the dialog or will trigger the popup? If it's the dialog then what triggers the popup?

Also, passing "true" as parameter in the Click() method will force the active browser to close. Is this what you want? 

Please provide as much info as possible. A Jing video demonstrating the issue may also help us to better understand what is happening.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Pankaj
Top achievements
Rank 2
answered on 27 Sep 2012, 05:58 AM
Hi Plamen,

Thanks for your reply.

What happens when that Click is performed? This will trigger the dialog or will trigger the popup? If it's the dialog then what triggers the popup?
After click it will popup an alert dialog and after click on OK button in the alert dialog it opens a new browser window.
The new browser window is not recognized by the telerik and when we check for browser count it shows 1 only.
Please find the attached video captured using jing, for more details and let me know if you need any other information.

The true parameter in the click method has been removed now,



Thanks and Regards,
Pankaj Kukkar
0
Plamen
Telerik team
answered on 28 Sep 2012, 01:52 PM
Hi Pankaj,

Thank you for providing the video. However without knowing the error you're getting it's hard to determine which line of your code fails. Please try the following code:
manager.SetNewBrowserTracking(true);
manager.DialogMonitor.Start();
 
AlertDialog dlg = new AlertDialog(manager.ActiveBrowser, DialogButton.OK);
manager.DialogMonitor.AddDialog(dlg);
ONEEMSElements.GetInstance.ctrl_PortalLinkIncase.Click();
dlg.WaitUntilHandled();
 
manager.Wait.For<Manager>(brw => brw.Browsers.Count > 1, Manager, 15000);
manager.WaitForNewBrowserConnect("url", true, 60000);
manager.ActiveBrowser.WaitUntilReady();
 
If it still not working using that code, please provide the exception details.

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
Diwakar
Top achievements
Rank 1
Answers by
Missing User
Diwakar
Top achievements
Rank 1
Carlos Marcão
Top achievements
Rank 2
Cody
Telerik team
venkatesen
Top achievements
Rank 1
Egor
Top achievements
Rank 1
Konstantin Petkov
Telerik team
sowjanya vunnava
Top achievements
Rank 1
Plamen
Telerik team
Pankaj
Top achievements
Rank 2
Share this question
or