Cucumber, capybara and selenium - Submitting a form without a button
I just had to solve this problem myself. In webrat I had something like this:
Then /^I submit the "([^\"]*)" form$/ do |form_id| submit_form form_idend
I was able to achieve the same thing with this in Capybara:
Then /^I submit the "([^\"]*)" form$/ do |form_id| element = find_by_id(form_id) Capybara::RackTest::Form.new(page.driver, element.native).submit :name => nil end