Upgrading Selenium for new Firefox version

Recently I’ve ran into a problem after I upgraded Firefox to the latest version and Selenium could not launch a new session. It turned out that Selenium has hardcoded Firefox version number and if your version of FF is greater than this number then it stops working and I got this wired error message: selenium failed to start new browser session, shutdown browser and clear all session data

This is that you can do to fix the problem.

  1. Create a directory and place your selenium-driver.jar in this directory.
  2. Copy your selenium-server.jar file in the newly created directory and go into this directory.
  3. Unzip the jar files contents here.
  4. First find all the *.rdf files – you should see 5 of them:
    • ./customProfileDirCUSTFF/extensions/{538F0036-F358-4f84-A764-89FB437166B4}/install.rdf
    • ./customProfileDirCUSTFF/extensions/readystate@openqa.org/install.rdf
    • ./customProfileDirCUSTFFCHROME/extensions/{503A0CD4-EDC8-489b-853B-19E0BAA8F0A4}/install.rdf
    • ./customProfileDirCUSTFFCHROME/extensions/{538F0036-F358-4f84-A764-89FB437166B4}/install.rdf
    • ./customProfileDirCUSTFFCHROME/extensions/readystate@openqa.org/install.rdf
  5. In each of these files you will see hardcoded version like this: 3.5.* Change them to 3.6.*
  6. All the files are now patched. Zip up the extracted files into a new JAR file selenium-server-new.jar

Now you should all set to use this patched version of selenium. You can delete your old selenium-server.jar file if you’d like.


Comments are closed.