To access the send_keys method send_keys you need to use the Selenium driver, not the :rack_test driver in Capybara:
- Install gem
selenium-webdriver and add it to your gem file if you are using bundler. - Mark your test with
:js => true so that it works with the Selenium driver.
You get an error because Capybara uses the driver :rack_test . Call native for an access element to specific driver methods. Driver elements :rack_test initially implemented as Nokogiri::XML::Element , so the send_keys methods send_keys not exist, and you get this error.
source share