• Jobs
  • About
  • Selenium RC 1.0.1 support for Firefox 3.6 February 1, 2010



    LATEST UPDATE (Jan 2010): We now have Firefox 4 in beta and you will face the same issue again. You might want to follow the instructions for patching Selenium server 1.x to support Firefox 4.



    UPDATE (Mar, 2010): On Feb 23, 2010 Selenium RC 1.0.3 was released. With this release it now supports

    • Firefox 3.6
    • Snow Leopard

    If you are looking for instructions to download and setup the latest Selenium RC release, look here.


    ORIGINAL ARTICLE:

    A lot of people are having trouble with selenium and firefox 3.6. Here I have described the steps to first ensure that the problem you are seeing is due to the lack of selenium’s support for your browser version and then steps to patch the selenium-server.jar to make it work with Firefox 3.6.

    Testing Selenium server support for Firefox

    The quickest way to test if your selenium server is supporting the Firefox version installed on your machine is to start selenium server in an interactive mode. Let us walk through these steps.

    1. Run Selenium server in interactive mode. To do this run the command:
      java -jar selenium-server.jar -interactive -singleWindow
    2. Start new selenium browser session using the command:
      cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
    3. If you see a line saying Preparing Firefox profile... and no progress beyond that, there is a high likelihood that the Firefox browser version you have is not supported by your version of selenium server jar you have. If you have Firefox 3.6 and selenium 1.0.1, the next section shows how to fix the problem.
    4. If you don’t see a problem, run the following command:
      cmd=open&1=http://www.google.com

    If the browser starts and you see Google’s home page in it, your basic setup seems to be fine.

    Patching Selenium server to support Firefox 3.6

    These steps should work for you on Unix, Mac or cygwin on windows. In case you are not using any of these, you would need to figure out the corresponding steps for our platform.

    1. Create a directory where you could manipulate the jar’s contents.
      cd ~/selenium101
    2. Copy your selenium-server.jar file in the newly created directory and cd into it.
      cp selenium-server.jar ~/selenium101/.
      cd ~/selenium101
    3. Unzip the jar files contents here and delete the jar file.
      unzip selenium-server.jar
      rm selenium-server.jar
    4. First find all the *.rdf files – you should see 5 of them:
      find . -name "*.rdf"
      ./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
      <em:maxVersion>3.5.*</em:maxVersion>
      Change them to
      <em:maxVersion>3.6.*</em:maxVersion>
    6. all the files are now patched. To jar them back up run the following steps:
      zip -r selenium-server *
      mv selenium-server.zip selenium-server.jar

    Rerun the browser tests as described earlier. Selenium should now be able to instantiate a new browser and drive it.

    Posted by Rahul Poonekar in : Selenium

    24 Responses to “Selenium RC 1.0.1 support for Firefox 3.6”

    1. Rob says:

      Great guide, but unfortunately this does not work on OSX Snow Leopard, not sure about other versions of OSX. I get the the following error

      09:27:40.893 INFO – Preparing Firefox profile…
      dyld: Library not loaded: /usr/lib/libsqlite3.dylib
      Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
      Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
      09:28:00.944 ERROR – Failed to start new browser session, shutdown browser and clear all session data

    2. Aaron Tinio says:

      a workaround for this is to use a Firefox profile for selenium and add
      extensions.checkCompatibility.3.6 (set to false) to about:config

      take note that “3.6″ should be part of preference name. see:
      http://kb.mozillazine.org/Extensions.checkCompatibility

    3. Ryan says:

      Thanks for publishing this. It was quite helpful.

    4. Mark says:

      Thanks! This worked for me. I can run FF3.6 now.
      If you want to create an executable jar like the original selenium-server.jar, run this command (make sure you are cd’d to the root where you unjarred) :
      jar -cvfm selenium-server.jar META-INF/MANIFEST.MF *

    5. samiron paul says:

      Thanks a lot for your help. I was about to lost thinking that how can i now run selenium with ff3.6 but your suggestions worked magically. Thanks again.
      Anyway, i did your steps with the help of 7zip software. Just opened the archive through it and modified the files that you noted in your post. and it worked. i didnt need any command :)

    6. Jaakko says:

      Thank you! Works like a charm.

    7. Sandrine says:

      Hi all,
      Thanks for your help, but I didn’t solve my problem with firefox 3.6 and Selenium 1.0.3
      When running the test in interactive mode with the following command line :
      java -jar selenium-server.jar -interactive –singleWindow
      cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
      The url http://www.google.com is not launched.
      I have the following url : chrome://src/content/RemoteRunner.html?sessionId=26444800ffc64974905cbe4f11748cae&multiWindow=false&baseUrl=http%3A%2F%2Fwww.google.com&debugMode=false&driverUrl=http://localhost:4444/selenium-server/driver/
      I checked *.rtf files and they all have version 3.6 3.6.*
      Any idea to solve this issue?
      Thanks in advance.
      Sandrine

    8. Rahul Poonekar says:

      This post is for patching Selenium 1.0.1. Selenium 1.0.3 has support for Firefox 3.6, which is why you see 3.6.* in your rtf files.

      Secondly, when you run
      cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
      in the interactive mode, it only opens a new Firefox window. It does not navigate to google. For opening google, you will have to run the next command, which is:
      cmd=open&1=http://www.google.com

    9. Sandrine says:

      Thanks Rahul for your response. This is working fine now on my machine.

    10. Bryan C says:

      Awesome artile and feedback everyone!

      Thanks so much!

    11. nitish says:

      Really great article

      thanks for help mate!!

    12. Sharad says:

      After doing above steps, Firefox is launched but scripts fail at scenario where it launches multiple window (child window).

    13. luis says:

      just great!
      Thanks a lot!

    14. Rahul Poonekar says:

      Can you provide more details – Which Firefox version are you using? What do you mean by the scripts fail when multiple windows are launched? Do you see some errors or is the context not set on the right window? I have used this patched selenium jar with Firefox 3.6 and still can run tests with multiple windows without any issues.

    15. sangeetha says:

      Hi , i tried the six steps suggested in “Patching Selenium server to support Firefox 3.6″ but now get the below error when i start selenium RC sever , Can anyone help me out on this…

      Note : i am running windows 7 and firefox version is 3.6.18.

      C:\selenium\selenium-remote-control-1.0.1-dist\selenium-remote-control-1.0.1\sel
      enium-server-1.0.1>java -jar selenium-server.jar
      Invalid or corrupt jarfile selenium-server.jar

    16. gayathri says:

      Thanks alot, its working :)

    17. vijay says:

      its good

    18. rayfol says:

      I test selenium server 2.3.1 with firefox 3.6.17
      tests are running fine on my local machine (windows 7)
      by cons I have a problem when I run the same tests on a remote windows (windows server 2003)

      I tried all the solutions for this forum, but the error still persists

      Thanks

      This is the exception :
      ERROR – Failed to start new browser session, shutdown browser and clear all session data
      java.lang.RuntimeException: Timed out waiting for profile to be created! at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360)

    19. Rahul Poonekar says:

      This post is for Selenium 1.x. I have a separate post for using Selenium 2 here. On that post, can you add your question with the snippet of code you are using to instantiate FirefoxDriver.

      Thanks

    20. Venkat says:

      Hi,
      I am trying to execute some selenium scripts. Eclipse is showing the error message “The Method getXpathCount(string) is undefined for type selenium” where ever i have used the method getXpathCount(String).
      I have the below jar files added to my referenced library:

      selenium-server-standalone-2.6.0.jar
      selenium-java-2.6.0-srcs.jar
      selenium-java-2.6.0.jar
      selenium-java-client-driver-sources.jar
      selenium-java-client-driver-test-sources.jar
      selenium-java-client-driver-tests.jar
      selenium-java-client-driver.jar

      I could understand that the mentioned jar files doesn’t have the method getXpathCount(String) defined. Please let me know if i am missing any jar file that contain this method. Also please let me know if i am using inappropriate version of jar files.

    21. shabina says:

      HI,

      Iam using Selenium RC server 9.0 on firefox 7
      but Iam unable to open the firefox after running ther server
      Is it supports firefox 7 version

      Regards
      Shabina.

    22. Here is how I got it to work
      Run the server with these parameters

      java -jar selenium-server-standalone-2.18.0.jar -forcedBrowserModeRestOfLine “*firefox /home/kirill/Downloads/firefox/firefox”

      Ubuntu “/home/kirill/Downloads/firefox/firefox”
      Windows “C:\ProgrammFiles\Firefox\firefox.exe”

      Where:
      “*firefox /home/kirill/Downloads/firefox/firefox”
      has to be
      “*firefox /where/ever/your/browser/executable/file/lives/firefox_executable”

      or you can to it yourself if you run:
      java -jar selenium-server-standalone-2.18.0.jar -h

      Never had this problem on Windows. Problem started after upgrading from Firefox 9.0.1 to Firefox 10.0.1 on Ubuntu 10.0.4

    23. Atul Jain says:

      Testing Selenium server support for Firefox Helped a Lot.

      Thank you very much for help. I was facing challenge in this issue

    Leave a Reply