开发者

How to use browser options in selenium?

开发者 https://www.devze.com 2023-01-03 08:10 出处:网络
I have a browser which takes certain parameters as options as shown below. testbrowser.exe -id=test -url=http://www.google.com/.

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: Faile开发者_开发问答d 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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消