Starting selenium server using Firefox user profile

I started the selenium server using the command below and I wanted to use the firefox user profile. But some of them create a new firefoxprofile in the / tmp / directory for each test case that I run.

/ usr / bin / java -jar / usr / local / groundwork / selenium / java / selenium -server-standalone-2.33.0.jar -firefoxProfileTemplate / root / .mozilla / firefox / lfmvce8i.selenium / &

When I check the firefox process using the command below, I see that a temporary profile has been created in the / tmp directory.

root 35660 4.6 12.9 810852 131352 pts / 0 Sl 10:10 0:10 / usr / lib 64 / firefox / firefox -profile / tmp / customProfileDirf 4461dd4c0fd4b388a595f159568fd4b root 35934 0.0 0.0 103244 840 points / 0 S + 10:14 0:00 grep firefox

Can someone please help me use a custom Firefox profile with selenium.

+3
source share
2 answers

The firefoxProfileTemplate option is no longer valid.

Use the webdriver.firefox.profile file instead.

Your team should be

/usr/bin/java -jar /usr/local/groundwork/selenium/java/selenium-server-standalone-2.33.0.jar -Dwebdriver.firefox.profile=selenium &

See: http://code.google.com/p/selenium/wiki/FirefoxDriver

Note that -Dwebdriver.firefox.profile accepts the username as a parameter, not a path.

+3
source

I am also trying to get standalone selenium to use a custom Firefox profile. By calling the selenium server from the command line in a batch file.

I saw in other Firefox user profile posts that the -firefoxProfileTemplate parameter is not valid. If so, why is this indicated in the help?

java -jar selenium-server-standalone-2.44.0.jar -h

-firefoxProfileTemplate <dir>: normally, we generate a fresh empty
    Firefox profile every time we launch.  You can specify a directory
    to make us copy your profile directory instead.

-firefoxProfileTemplate <path-to-profile> -Dwebdriver.firefox.profile=<name-of-profile>

java -jar selenium-server-standalone-2.44.0.jar -htmlSuite "* googlechrome" " http://qa-map-pat.valtech.dk" "/TESTSUITE.html" "results.html"

, firefox.exe. -Dwebdriver.firefox.bin "C:\Program Files (x86)\Mozilla Firefox\firefox.exe", , . PATH Windows.

, , , , ?

0

All Articles