I’m using Capybara selenium in my Rails project (on an Ubuntu 10.04 system) and I’ve just upgraded firefox now when I’m running my tests firefox loads but it now has all the add-ons installed and it waits until I set each one up for the first time.
Is there a way to disable all these add-ons when starting selenium?
OR
Is there a way to setup all my add-ons and save the settings so that it doesn’t prompt me everytime the tests are ran?
Update
If I change it over to use chrome it works fine with that.
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.javascript_driver = :selenium
I would like to do the tests with firefox though. I’ve setup a ‘test’ profile under firefox and tried using it with the following:
Capybara.register_driver :selenium_firefox_custom do |app|
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => "test")
end
Capybara.default_driver = :selenium_firefox_custom
Which didn’t work, it still tried to load my default profile.
I’m using the git version of capybara;
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
I’ve also tried using Capybara.javascript_driver = :selenium_firefox_custom
Try using a custom profile, and naming it however you like:
Depending on the version you’re using the API may have changed, but pretty much this is what you have to do.