Debugging capybara-webkit

If you ever run into weird issues with capybara-webkit you might find some clues about them by enabling logging:

session =

After that it will print in stdout the commands that are being executed and their results, for example:

Received "Visit(" Started "Visit(" Load started "Visit(" started page load Started request to "" Finished "Visit(" with response "Success()" Received 0 from "" Page finished with false Load finished Page load from command finished Wrote response false "{"class":"InvalidResponseError","message":"Unable to load URL: because of error loading Unknown error"}" /Users/tanob/.rvm/gems/ruby-2.1.3/gems/capybara-webkit-1.3.1/lib/capybara/webkit/browser.rb:275:in `check': Unable to load URL: because of error loading Unknown error (Capybara::Webkit::InvalidResponseError)

This helped me to find Github Issue #674 in capybara-webkit about the weird “Received 0” message. Looks like it’s related to the upgrade to OSX Yosemite and the workaround for now is to ignore SSL errors (session.driver.browser.ignore_ssl_errors).