Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I was getting this same error. For me it turned out that it was calls to <code>save_and_open_page</code> within my test that were causing the problem. I removed those and the Firefox profile errors stopped.</p> <p>I haven't had any need (yet) for a special Firefox profile just for capybara/selenium, but, to answer your question more thoroughly, in trying to solve this problem I came across the following two methods to specify a profile for Firefox.</p> <p><strong>Note:</strong> Neither of these actually solved my problem with the profile errors but I'm including them here anyway, since you asked.</p> <p><strong>Method 1:</strong> (Requires each developer on project to setup special profile in Firefox.)</p> <p>Add the following to your test_helper.rb</p> <pre><code>Capybara.register_driver :my_firefox_driver do |app| Capybara::Selenium::Driver.new(app, :browser =&gt; :firefox, :profile =&gt; 'name_of_existing_profile') end </code></pre> <p><strong>Method 2:</strong> (Does not require each developer on project to setup special profile in Firefox.)</p> <p>Add the following to your test helper.rb</p> <pre><code>require 'selenium-webdriver' ... Capybara.register_driver :my_firefox_driver do |app| profile = Selenium::WebDriver::Firefox::Profile.new Capybara::Selenium::Driver.new(app, :browser =&gt; :firefox, :profile =&gt; profile) end </code></pre> <p>Then, regardless of which above method you choose, set your default driver to the new driver, or selectively use the new driver by putting <code>Capybara.current_driver = :my_firefox_driver</code> at the beginning of your tests and ensuring that your test_helper.rb includes a teardown task to <code>Capybara.use_default_driver</code> which it should if you followed the setup instructions.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload