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

LaunchNewBrowser does not work

8 Answers 185 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 24 Feb 2014, 06:25 PM
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)
{

}

8 Answers, 1 is accepted

Sort by
0
Vishal
Top achievements
Rank 1
answered on 25 Feb 2014, 06:16 AM
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.
0
Stephen
Top achievements
Rank 1
answered on 25 Feb 2014, 04:48 PM
I tried setting the "Platform Target" to x86 but it did not help.

Thanks,
Steve
0
Cody
Telerik team
answered on 28 Feb 2014, 12:03 AM
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
0
Vishal
Top achievements
Rank 1
answered on 28 Feb 2014, 08:42 AM
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 
0
Stephen
Top achievements
Rank 1
answered on 28 Feb 2014, 03:18 PM
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");
0
Cody
Telerik team
answered on 05 Mar 2014, 06:01 PM
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
0
Vishal
Top achievements
Rank 1
answered on 13 Mar 2014, 06:24 AM
Thanks cody for reply,

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

Thanks 
Vishal
0
Cody
Telerik team
answered on 13 Mar 2014, 04:39 PM
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
 
Tags
General Discussions
Asked by
Stephen
Top achievements
Rank 1
Answers by
Vishal
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Cody
Telerik team
Share this question
or