As a result of #970, selenium-webdriver is now an optional dependency of Capyabra. However, on projects where selenium-webdriver is not in the Gemfile, a LoadError is raised even if selenium-webdriver is not used. This is due to the uncondional require of capybara/selenium/driver on line 321 of capybara.rb: http://git.io/0tRUfQ.
I am also experiencing this after upgrading to 2.1.0.beta1.
Delay requiring selenium until driver is used, closes #1018
I messed up when I changed from autoload to require, didn't count on the fact that this would eagerly require the selenium driver. Fixed.
Quick fix! Thanks!
Sorry to be obtuse, but you also removed rack-test? So there's no default driver?
Hopefully, as soon as the RackTest driver is used, it will require the needed files. I tried this out with a script and it seemed to work.
Hmm. Not working for me with Rails 4, Capybara from Git, and RSpec 2.13.0. I'll try to figure it out.
Failure/Error: visit '/'
uninitialized constant Capybara::RackTest::Driver
# ./spec/request/home_spec.rb:9:in `block (4 levels) in <top (required)>'
It's probably this. We override the default rack_test driver for Rails, and that one doesn't require anything.
This is actually a bit problematic, since anyone who has done that will have to require the rack-test driver, so this ends up being an API breaking change. That's not okay, so we need to fix this another way.
Revert "Delay requiring selenium until driver is used, closes #1018"
This reverts commit 07f2a71.
Delay loading selenium until driver in instantiated
Another attempt at fixing #1018
Just pushed a new attempt at a fix for this.
That works! Thanks.
Works great. Thanks!
@topfunky Cool, thanks.