Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Making Selenium 1.0.1 work with Firefox 3.6

, 31 Jul 2010
Rate this:
Please Sign up or sign in to vote.
CodeProjectThese days, I’m doing a bit of end-to-end acceptance web testing using the Selenium framework. Selenium has a nice and handy add-on for the Firefox browser – the Selenium IDE. It automatically records your actions and produces the required C# code for you, as you click around in the brows

These days, I’m doing a bit of end-to-end acceptance web testing using the Selenium framework. Selenium has a nice and handy add-on for the Firefox browser – the Selenium IDE. It automatically records your actions and produces the required C# code for you, as you click around in the browser window.

But when I started the Selenium server and tried to run my first test (copied from the Selenium docs), it didn’t work (Sigh. It never works on the first try…) and I got a timeout and an exception. This is what my Gallio test report showed:

SeleniumException

Huh? A file could not be deleted (obviously a temporary file that is internally used by the browser)? The Selenium docs were not of much help here.

When I thought it over for a minute, I started to suspect what the real, underlying problem could be: I’m using the new 3.6 version of Firefox, which is about half a year more recent than the current Selenium release. So it might be again an incarnation of our good old friend named ‘version mismatch’… Searching Google for ‘selenium firefox 3.6’ quickly revealed that I was right: the problem simply is that the Selenium server only accepts Firefox versions up to 3.5. This can easily be corrected. Here’s how:

  ---  Remark: The following solution includes the usage of the free 7-Zip file archiver.  --

1. In Windows Explorer, go to the directory where your Selenium server is located (i.e. where the ‘selenium-server.jar’ file lives). After you made a backup of the original file, open it directly with 7-Zip (a *.jar file is actually a compressed archive).

2. We need to patch five instances of a file called ‘install.rdf’ (they actually are small xml files). These files can be found at the following locations in the ‘selenium-server.jar’ archive:

  • customProfileDirCUSTFF/extensions/

        {538F0036-F358-4f84-A764-89FB437166B4}

        readystate@openqa.org

  • customProfileDirCUSTFFCHROME/extensions/

        {503A0CD4-EDC8-489b-853B-19E0BAA8F0A4}

        {538F0036-F358-4f84-A764-89FB437166B4}

        readystate@openqa.org

3. Open each of these files (directly from within 7-Zip) with Notepad or any other text/xml editor. Replace the following text…

<em:maxVersion>3.5.*</em:maxVersion>

… with this (you might have guessed it already):

<em:maxVersion>3.6.*</em:maxVersion>

4. Notepad (or your favorite text/xml editing tool) will ask you to confirm your changes, and so will 7-zip immediately after the file change. Confirm all, close the archive after you’re done, and start the selenium server as usual.

Happy testing…

<iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&Task=Get&PageID=31016&SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No> <script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&Task=Get&Browser=NETSCAPE4&NoCache=True&PageID=31016&SiteID=1"></script> <noscript> </noscript> </iframe>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Thomas Weller
Software Developer (Senior) Freelancer
Germany Germany
I'm a freelance software developer/architect located in Southern Germany with 10+ years of experience in C++, VB, and C# software projects. In the last few years I do all my coding exclusively in C#.
I am especially dedicated to Test-driven development, OO architecture, and software quality assurance issues and tools.
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 5 PinmemberOffBear7-Oct-10 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 1 Aug 2010
Article Copyright 2010 by Thomas Weller
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid