LaunchNewBrowser does not work

9 posts, 0 answers
  1. Stephen
    Stephen avatar
    23 posts
    Member since:
    Feb 2014

    Posted 24 Feb 2014 Link to this post

    Hi,

    I am unable to get the LaunchNewBrowser() feature to work (using Chrome or IE).  If I use the default settings for LaunchNewBrowser, I get an error that "Wait for condition has timed out".  If I turn the "wait for condition" off, then I get an error that "Sequence contains no elements".

    Here is my sample code:

    // Initialize the settings
    Settings mySettings = new Settings();

    // Set the default browser
    mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;

    //mySettings.Web.

    // Create the manager object
    Manager myManager = new Manager(mySettings);


    // Start the manager
    myManager.Start();

    // Launch an instance of the browser
    try
    {

    // myManager.LaunchNewBrowser(BrowserType.InternetExplorer, false);

    myManager.LaunchNewBrowser();

    ActiveBrowser.NavigateTo("http://www.google.com");
    }
    catch (Exception e)
    {

    }
  2. Vishal
    Vishal avatar
    18 posts
    Member since:
    Jan 2014

    Posted 25 Feb 2014 in reply to Stephen Link to this post

    I exactly had the same problem. I am using windows 7- 64 bit. I found the solution here http://www.telerik.com/forums/test-execution-client

    It didn't  work for me, If it works for you please let me know.
  3. Stephen
    Stephen avatar
    23 posts
    Member since:
    Feb 2014

    Posted 25 Feb 2014 Link to this post

    I tried setting the "Platform Target" to x86 but it did not help.

    Thanks,
    Steve
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 27 Feb 2014 Link to this post

    Hi Stephen,

    Are you using Visual Studio for this and trying to run a test in Visual Studio? For the problem with IE, make sure Visual Studio is running at administrator level. If you don't do this then Windows will block our attempt to connect to IE as a "security threat".

    For the problem with Chrome, try this troubleshooting article.

    Regards,
    Cody
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Vishal
    Vishal avatar
    18 posts
    Member since:
    Jan 2014

    Posted 28 Feb 2014 in reply to Cody Link to this post

    Hi Cody,

    I also had the same problem.  I was using Windows 7 - 64 bit OS. The above solution worked for me. I was able to execute the test in IE. but the same is not working for Chrome .
    I am using : Chrome:33 and  Extension is installed properly :
    Please find the extension below.
    Telerik TestStudio 2013.2.1210.0  Telerik TestStudio browser automation extension 
  6. Stephen
    Stephen avatar
    23 posts
    Member since:
    Feb 2014

    Posted 28 Feb 2014 in reply to Cody Link to this post

    Hi Cody,

    I ran Visual Studio as Admin, and that seems to have fixed the issue with LaunchNewBrowser.  However, I am getting an exception on the next line of code (ActiveBrowser.NavigateTo).  The error is "Object reference not set to an instance of an object.  I am running this on my local system (not a VM).  Below is the code that I'm using (including some commented out sections that I've tried).

    Thanks,
    Steve
    -----------------

    myManager.LaunchNewBrowser();

    //myManager.LaunchNewBrowser(BrowserType.Chrome, false);

    // myManager.LaunchNewBrowser(myManager.Settings.Web.DefaultBrowser, false, system.diagnostics.ProcessWindowStyle.Minimized);

    // myManager.LaunchNewBrowser(myManager.Settings.Web.DefaultBrowser, false, ProcessWindowStyle.Minimized);

    ActiveBrowser.NavigateTo("http://www.google.com");
  7. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 05 Mar 2014 Link to this post

    Hi,

    @Vishal - The version of  Test Studio you have installed is to old to support Chrome 33. Please upgrade to our latest internal build, 2013.2.1417 which has many fixes to work properly with the latest version of Chrome.

    @Stephen - Please try this instead:
    myManager.ActiveBrowser.NavigateTo(...

    Regards,
    Cody
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  8. Vishal
    Vishal avatar
    18 posts
    Member since:
    Jan 2014

    Posted 13 Mar 2014 in reply to Cody Link to this post

    Thanks cody for reply,

    Can you please send me the link to download  internal build, 2013.2.1417.

    Thanks 
    Vishal
  9. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 13 Mar 2014 Link to this post

    Hi Vishal,

    You can obtain the latest internal build by logging in to your Telerik.com account and going to the Latest Internal Build page - see attached screen shot.

    Note that we're up to 2012.2.1510 now, which contains all fixes that . If you prefer to go with 2013.2.1417 does and adds VS 2013 compatibility, here's a link to obtain that build. This link will be valid for only 30 days.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top