开发者

Selenium Starting Custom Profile on Remote Machine Mac OS

I am attempting to launch a custom firefox profile on a remote machine, launching from Windows XP to Mac OS X. The browser launchs using the custom profile but opens the set up url and the remote runner on the same URL path (essentially the test doesn't run).

Setup:

    selenium = new DefaultSelenium(setup.host, setup.port, setup.browser, setup.url);
    selenium.start();

Pulls this:

    static String host    = "192.168.224.49";
    static int port       = 4444; 
    static String browser = "*custom"+" "+"//Applications//Firefox.app//Contents//MacOS/f开发者_开发知识库irefox-bin"+" "+"-P"+" "+"Selenium";
    static String url     = "http://test.Example.com"; 

Opens the browser and is using correct profile but does not load the URL correctly.

Any help will be greatly appreciated!


To launch firefox using customProfile, you don't need to open it as custom browser. You should be setting the firefoxprofileTemplate while starting the server.

If you are starting the jar from the command prompt using java -jar selenium-server command then you should be using the following command:

java -jar selenium-server -firefoxProfileTemplate <path to firefox template>

If you are starting the server using code, then you should use the below code:

SeleniumServer selServer;
RemoteControlConfiguration rc;
rc.setFirefoxProfileTemplate(File which refers to FirefoxProfileTemplate)
selServer=new SeleniumServer(false,rc);

For both, you should create the firefox profile first using firefox -P command.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜