Skip to content

Instantly share code, notes, and snippets.

@beccasaurus
Created May 24, 2011 19:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beccasaurus/989533 to your computer and use it in GitHub Desktop.
Save beccasaurus/989533 to your computer and use it in GitHub Desktop.
Capybara RackTest extension for submitting a form without a button
module SubmitRackTestFormWithoutButton
def submit_form!
Capybara::RackTest::Form.new(driver, form).submit({})
end
end
Capybara::RackTest::Node.send :include, SubmitRackTestFormWithoutButton
# in your code ..
find('input-or-whatever').submit_form!
@minimul
Copy link

minimul commented Apr 10, 2013

@alexdesi Yes, Capybara::Node::Element needs to be extended also see http://minimul.com/submitting-a-form-without-a-button-using-capybara.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment