Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uninitialized constant Capybara::DSL

I can't seem to figure out why this doesn't work, I don't know what else to say as I'm sure this should be quite simple.

>> pry
[1] pry(main)> require 'capybara'
^[[A=> true
[2] pry(main)> require 'selenium-webdriver'
=> true
[3] pry(main)> include Capybara::DSL
NameError: uninitialized constant Capybara::DSL
from (pry):3:in `__pry__'

Any help would be really appreciated as this little issue is driving me mad.

like image 621
Ozzy Avatar asked May 10 '17 15:05

Ozzy


1 Answers

To get access to Capybara::DSL you need to require 'capybara/dsl' (instead of just 'capybara') as documented here

like image 152
Thomas Walpole Avatar answered Sep 19 '22 23:09

Thomas Walpole