Attaching to existing Browser

18 posts, 1 answers
  1. Diwakar
    Diwakar avatar
    4 posts
    Member since:
    Feb 2008

    Posted 12 Apr 2010 Link to this post

    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.
  2. Answer
    Missing user
    Missing user avatar

    Posted 12 Apr 2010 Link to this post

    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.
  3. Diwakar
    Diwakar avatar
    4 posts
    Member since:
    Feb 2008

    Posted 12 Apr 2010 Link to this post

    Thank you for clarifying this aspect Nelson. Will wait for the feature in the future releases.

    Diwakar.
  4. Carlos Marcão
    Carlos Marcão avatar
    9 posts
    Member since:
    Jun 2010

    Posted 07 Jun 2010 Link to this post

    Hello.

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

    Thanks,
    Carlos Marcão
  5. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 07 Jun 2010 Link to this post

    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.
  6. venkatesen
    venkatesen avatar
    2 posts
    Member since:
    Jun 2010

    Posted 14 Jun 2010 Link to this post

    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?

  7. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 14 Jun 2010 Link to this post

    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.
  8. Diwakar
    Diwakar avatar
    4 posts
    Member since:
    Feb 2008

    Posted 15 Jun 2010 Link to this post

    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.
  9. venkatesen
    venkatesen avatar
    2 posts
    Member since:
    Jun 2010

    Posted 15 Jun 2010 Link to this post

    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.


  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 15 Jun 2010 Link to this post

    @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.
  11. Diwakar
    Diwakar avatar
    4 posts
    Member since:
    Feb 2008

    Posted 16 Jun 2010 Link to this post

    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.
  12. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Jun 2010 Link to this post

    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.
  13. Egor
    Egor avatar
    1 posts
    Member since:
    Aug 2010

    Posted 09 Sep 2010 Link to this post

    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?
  14. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 10 Sep 2010 Link to this post

    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
  15. sowjanya vunnava
    sowjanya vunnava avatar
    2 posts
    Member since:
    Jan 2010

    Posted 24 Sep 2012 Link to this post

    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
  16. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 26 Sep 2012 Link to this post

    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
  17. Pankaj
    Pankaj avatar
    11 posts
    Member since:
    Apr 2012

    Posted 27 Sep 2012 Link to this post

    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
  18. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 28 Sep 2012 Link to this post

    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
Back to Top