Question

I am using selenium-server-standalone-2.41.0.jar on Mac OSX 10.8.5 with Java 7 Update 55.

Everything works fine with Firefox up to version 25.0.1 but if I try v26, v27, v28 or v29 of Firefox, then my code will open up firefox and it will just hang (nothing loads on firefox screen).

When I downgrade Firefox back to v25 then it all starts working again fine.

Any thoughts or suggestions?

Thanks

EDIT: Posted problem on Selenium bug forum as well: https://code.google.com/p/selenium/issues/detail?id=7279

Was it helpful?

Solution

There actually quite a few other threads on people having this same issue with Firefox starting up and a blank screen just sitting there doing nothing. I tried all combinations of Firefox from v25.0.1 to v33 with all versions of selenium-server-standalone from v2.41.0 to v2.44.0 and the only combination I can get to work is FF v25.0.1 with SSS v2.41.0.

So I finally came up with a workaround for this problem so I can use FF v33 for normal surfing and keep Selenium working with FF v25. This is what I did:

(1) I updated my day to day Firefox to the newest version.

(2) I downloaded a second older version of Firefox (v25.0.1) from here https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/25.0.1/ Then on my Mac I installed onto the Desktop and then renamed the it from Firefox.app to Firefox25.0.1.app and then moved it into my Applications folder.

(3) I created a new second profile for Firefox from here https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles and named it ffSeleniumProfile

(4) I then had to make sure the config file still had the default profile as the default. On Mac, look in ~/Library/Application Support/Firefox/profiles.ini file and it should look something like this (note that Default=1 should be under Profile0 )

    [General]
    StartWithLastProfile=1

    [Profile0]
    Name=default
    IsRelative=1
    Path=Profiles/abcd1234.default
    Default=1

    [Profile1]
    Name=ffSeleniumProfile
    IsRelative=1
    Path=Profiles/a1b2c3d4.ffSeleniumProfile

(5) For Selenium Server Standalone, make sure you are using v2.41.0 selenium-server-standalone-2.41.0.jar from here http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar

(6) Finally when you are starting Java and calling for Firefox/FirefoxDriver you will need to specify it to use Firefox25.0.1.app and the ffSeleniumProfile. I did this by adding the following System.setProperty to my main method of the primary java file that I use when starting java:

  public static void main(String[] args) 
    throws InterruptedException,MalformedURLException {

    System.setProperty("webdriver.firefox.bin", "/Applications/Firefox25.0.1.app/Contents/MacOS/firefox-bin");

    System.setProperty("webdriver.firefox.profile", "ffSeleniumProfile");

  }

Now when I start Selenium Java, it will use v25.0.1 of firefox along with the second profile, and when I just start firefox from my desktop it will use the default profile and whatever the newest version I have upgraded too.

Again this is a workaround only, but it solves my problem for now.

OTHER TIPS

Hey Try Disabling some Add-ons in your Firefox browser one by one and try running the code This helped me on windows . Try it once..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top