views:

151

answers:

2

I have a browser which takes certain parameters as options as shown below.

testbrowser.exe -id=test -url=http://www.google.com/.

Below is my selenium code.

selenium = new DefaultSelenium("localhost", 4444, "*custom "+testBrowser+" -id=test -url=", "http://www.google.com/");
selenium.start();
selenium.open("http://www.yahoo.com");

When i execute this i am getting the below error.

java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:103)

I think the problem is with options that my browser requires as the same code works fine with firefox or IE.

Please help me in solving this options issue.

Thanks in Advance Gururaj R

A: 

Have you tried passing the URL after the "-url=" in your custom browser string? That command looks a little funky otherwise.

nirvdrum
ya i tried but i ended up in the same error.
Guru1985
A: 

Do you really need the -url=http://inserturl.here/ as that is what selenium.open(...) does?

AutomatedTester
Ya the browser needs it. I tried without giving that option also but ended up in the same error.
Guru1985
are you giving it the full path to the browser exe in the custom?
AutomatedTester