For some reason, #submit isn't part of Capybara's public API.
For reference, here is Capybara's ...
For some reason, #submit isn't part of Capybara's public API.
For reference, here is Capybara's ...
@alexdesi Yes, Capybara::Node::Element needs to be extended also see http://minimul.com/submitting-a-form-without-a-button-using-capybara.html
Hmm. I haven't tried running any code yet, but I remember that I copy/pasted the
Capybara::RackTest::Form.new(driver, form).submit({})
code from on of Capybara's#click
methods. I remember that, behind the scenes, Capybara obviously knew how to submit a form, but it ONLY exposed this via a button click.Anyway ... I looked at the current version of node.rb and the Form submit code has been slightly tweaked and now looks like:
Capybara::RackTest::Form.new(driver, form).submit(self)
That said, if you're getting an undefined method
submit_form!
for Element ... that's a different problem. You should get aCapybara::RackTest::Node
as the result of calling#find(...)
. Are you using RackTest (as opposed to Selenium, Webkit, etc)?Hope that helps? The only problem that I can think of is that you're not using the
:rack_test
driver? Lemme know if I can help any more (but I gotta run for now).