Not able to connect with a already open Browser

10 posts, 0 answers
  1. Kuldeep
    Kuldeep avatar
    7 posts
    Member since:
    Jan 2014

    Posted 21 Feb 2014 Link to this post

    Telerik Test studio is not able to identify controls from already opened browser window. i've tried it with the connect browser option but it is giving exception. please find attached snap shot of exception for additional details.
  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 26 Feb 2014 Link to this post

    Hello Kuldeep,

    Please note that attaching the recorder to already opened browser is only possible when you use IE only.
    If you are trying to connect to different browser that IE this is expected version. 
    If you are using IE please check this article for more information. Since you are using Visual Studio the most common reason for this is if you are not running Visual Studio as administrator. Please also make sure you check the other options described in the article.

    Regards,
    Ivaylo
    Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Kuldeep
    Kuldeep avatar
    7 posts
    Member since:
    Jan 2014

    Posted 26 Feb 2014 in reply to Ivaylo Link to this post

    Thanks Ivaylo.

    Mentioned article shows the issue regarding Launching Recorder to existing browser. but my question is identify controls via code in an already opened browser.

    i.e.

    manager.WaitForNewBrowserConnect("http://demos.kendoui.com/web/grid/editing-custom.html", true, 3000);

    let me know if additional details required in this matter.

    Thanks
    Kuldeep Vasani.
  4. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 03 Mar 2014 Link to this post

    Hello Kuldeep,

    You cannot proceed and attach to already opened browser as you demonstrated. Are you opening the browser via code or you are opening it manually. Please provide a sample test for more clarity on what you are trying to achieve.

    Looking forward to hearing from you.

    Regards,
    Ivaylo
    Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Kuldeep
    Kuldeep avatar
    7 posts
    Member since:
    Jan 2014

    Posted 03 Mar 2014 in reply to Ivaylo Link to this post

    We are trying to access browser opened by Coded UI test. Please find below snapshot of coded for your reference.

                BrowserWindow Browser = new BrowserWindow();
                Browser.NavigateToUrl(new Uri("http:\\www.xyz.com"));
                /*
                 * Some Coded UI Steps 
                 */

    manager.WaitForNewBrowserConnect("http://demos.kendoui.com/web/grid/editing-custom.html", true, 3000);

    let me know if additional details required in this matter.

    Thanks
    Kuldeep Vasani.
  6. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 05 Mar 2014 Link to this post

    Hello Kuldeep,

    Please try using the following code:

    // Initialize the settings
    Settings mySettings = new Settings();
      
    // Set the default browser
    mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
      
    // Create the manager object
    Manager myManager = new Manager(mySettings);
      
    // Start the manager
    myManager.Start();
      
    // Launch a new browser instance. [This will launch an IE instance given the setting above]
    myManager.LaunchNewBrowser();
      
    // Navigate to a certain web page
    myManager.ActiveBrowser.NavigateTo("http://www.google.com");


    Regards,
    Ivaylo
    Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Kuldeep
    Kuldeep avatar
    7 posts
    Member since:
    Jan 2014

    Posted 05 Mar 2014 in reply to Ivaylo Link to this post

    This will open a browser fro Telerik Test Studio test and Navigate to Google.com.

    but my question is to connect to browser which Is already open.

    I am not able to achieve it with this piece of code.

    Thanks
    Kuldeep Vasani
  8. Madhu
    Madhu avatar
    23 posts
    Member since:
    Dec 2010

    Posted 06 Mar 2014 in reply to Kuldeep Link to this post

    Hi Kuldeep,

    I'm also interested in your post, you're trying to execute tests on already opened browser? or
    trying to record further steps on already opened browser?

    I hope 1st one is not possible with telerik test studio but 2nd option you could.

    Thanks,
    Madhu
  9. Kuldeep
    Kuldeep avatar
    7 posts
    Member since:
    Jan 2014

    Posted 06 Mar 2014 in reply to Madhu Link to this post

    Yes Madhu, we are trying to execute tests on already opened browser.

    I have referred some of the Telerik forum entries which says it is a limitation of Telerik and they are working on it. entries were more that 18 months old. so I was wondering weather they have added support of it is still missing from Telerik.


    Thanks
    Kuldeep
  10. Tim
    Tim avatar
    2 posts
    Member since:
    Oct 2014

    Posted 25 Mar in reply to Kuldeep Link to this post

    I'm also interested as to whether there's a resolution for your issue.
Back to Top