If you’re using Selenium with Cucumber on a Mac you probably know that Firefox 3.5.3 is that latest version that works with Selenium. I was getting fed up with not being able to update to the latest version of Firefox so here’s what I did. Simply install Firefox 3.5.3 (the latest Selenium compatible browser at the time of this writting) and name it /Applications/Firefox-3.5.3.app
This will be the Firefox installation Selenium will use and now you’re free to upgrade your /Applications/Firefox.app install.
Now add the following code to your RAILS_ROOT/features/environments/selenium.rb file.
config.mode = :selenium
# Selenium defaults to using the selenium environment. Use the following to override this.
config.application_environment = :test
config.selenium_browser_key = “*firefox /Applications/Firefox-3.5.3.app/Contents/MacOS/firefox-bin“
end
Don’t forget to do this hack:
$ cd /Applications/Firefox-3.5.3.app/Contents/MacOS
$ mv libsqlite3.dylib _libsqlite3.dylib
For more help setting up Cucumber and Selenium, check my other post Setting Up Cucumber to Use Webrat and Selenium with Rails.
