1
votes

I want to use Selenium Server on Windows 7 with a FirefoxPortable as browser, starting the selenium-server-standalon JAR file. My first attempt was without a profile, just like this:

java -jar selenium-server-standalone-2.33.0.jar 
     -htmlSuite "*firefox C:\Users\rplantik\Portables\selenium\FirefoxPortable\FirefoxPortable.exe" 
      "http://127.0.0.1"    
      "C:\Users\rplantik\Portables\selenium\rest\testsuite.html" 
      "testresults.html"

The Jetty server was started, but it crushed after having issued the info message Preparing Firefox profile...

I found out that there is another portable app, called FirefoxPortable2ndProfile, which allows you to start FirefoxPortable with another than the built-in profile. I therefore downloaded that application, too, and modified the command as follows, to include the path to the different profile:

java -jar selenium-server-standalone-2.33.0.jar 
     -firefoxProfileTemplate C:\Users\rplantik\Portables\selenium\FirefoxPortable2ndProfile\Data\profile 
     -htmlSuite "*firefox C:\Users\rplantik\Portables\selenium\FirefoxPortable\FirefoxPortable.exe" 
      "http://127.0.0.1"    
      "C:\Users\rplantik\Portables\selenium\rest\testsuite.html" 
      "testresults.html"

Now it seems that the profile was created successfully (Preparing Firefox profile... seems to be executed as intended - for a short moment, the "Firefox" logo pops up), then the message Launching Firefox... appears, and indeed a firefox application is started.

But after that, the test suite is not executed. Instead, the browser stays on the default site, and there is no further action until I stop the process in the console.

How to use Selenium with Firefox Portable?

1
I signed in to sqa.stackexchange.com and copied the question: sqa.stackexchange.com/questions/6619/…rplantiko

1 Answers

1
votes

Point to the profile folder of the portable installation: (C:\selenium\firefox_portable-14.0.1\Data) ie. C:\selenium\server>java -jar selenium-server.jar -firefoxProfileTemplate "C:\selenium\firefox_portable-14.0.1\Data"

Additional info here: http://portableapps.com/node/5376

NOTE: I had to close all Firefox windows before running the tests. Otherwise the latest version of Firefox is launched.