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.
As I don't use Ubuntu I can only suggest my Windows workaround. I think it's a proper way to use a second Firefox profile without Plug- ins to run selenium tests.
In Windows that can be achieved by feeding "firefox.exe -ProfileManager -no-remote" to Windows Run.
A untested way for Ubuntu would be [Alt]+[F2] and firefox -ProfileManager. It's important to close all Firefox Windows and maybe kill still existing processes before
If you didn't want to create a profile that you have to maintain (eg: checking in to source control, etc), you could create the profile on the fly as follows:
That will create a profile on the fly that won't update the browser version or the extensions. Hope that helps!
This link might be able to help you : http://www.seleniumwiki.com/automation-tips/how-to-disable-add-ons-pop-up-for-custom-firefox-profile/