Part of the reason for the 1.0.4 release of Se-IDE last week was support for the Firefox 3.6 series of browsers. Now, Mozilla has a fairly aggressive upgrade process, but you can’t always trust that people have the same / current version of the browser. That means you need to test against multiple versions of Firefox.

This post explains my trick of having multiple Firefox versions on a single Mac OS machine.

  1. Download as many releases as you want / care about
  2. Rather than install it into Applications like you normally would, install it into a folder in Applications that relates to the version.
  3. Start each one and uncheck the Preference that would have the browser check for updates

Now you have many different versions of Firefox installed. There are likely to be some headaches around plugins, etc. but those could likely be mitigated by having a different profile for each one.

What about with Selenium? To do that we need one extra step

  1. Mac applications are directories called Something.app (so Firefox.app). So what you want to do is create a symlink from /Applications/your-version-of-firefox-dir/Firefox.app to /Applications/Firefox.app

Now you can run your Se-RC tests on different versions of Firefox by changing where the symlink points to. This is because how Se-RC finds Firefox on the system. Here is the Firefox 2 locator. Three is very similar.

<pre lang="java">private static final String[] USUAL_UNIX_LAUNCHER_LOCATIONS = {
        "/Applications/Firefox-2.app/Contents/MacOS",
        "/Applications/Firefox.app/Contents/MacOS",
        "/usr/lib/firefox", /* Ubuntu 7.x default location */
};

In this trick we’re making use of the middle location.