This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Testing and the fly likes Selenium - problem in starting the browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Selenium - problem in starting the browser" Watch "Selenium - problem in starting the browser" New topic

Selenium - problem in starting the browser

Guy Roth
Ranch Hand

Joined: Aug 09, 2009
Posts: 74
We have got a Test suite based on Selenium. Lately We shift our testing machine to a new machine, and since then the Selenium tests can't run properly.
The exception that I get is:
com.thoughtworks.selenium.SeleniumException: Failed to start new browser session: Error while launching browser
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(
at com.thoughtworks.selenium.HttpCommandProcessor.getString(
at com.thoughtworks.selenium.HttpCommandProcessor.start(
at com.thoughtworks.selenium.DefaultSelenium.start(

what's weired in my case is that I get it every first time that I try to run Selenium test suite and then on the second time I run it, it succeed. So nothing wrong in my code basically.
The code is:

The new machine is 64 bit and it try to load IE7 based on 64 bit. Again- sometimes the same tests run and sometimes not with exactly the same code.
another thing is that when it tries to run it is stuck for 30 minutes on the command: browser.start();
and then throws the exception above probably as a result of a timeout.

Has anyone any idea what caused this annoying error and how to avoid it?
rumija ho

Joined: May 24, 2011
Posts: 2

i am also getting the same error. For the First time it is redirecting to some Blank.html page present in "C:\Users\<Currect User>\AppData\Local\Temp\CustomProfileDir*\Core\Blank.html". But from the second time onwards it is working fine. Could you please help me if you have resolved this issue.

Thanks in advance

I agree. Here's the link:
subject: Selenium - problem in starting the browser