Capybara::RackTest::Form.submit throws exception using Capybara::RackTest::Driver
cschilbe opened this issue · comments
Meta
Capybara Version: 3.39.1
Driver Information (and browser if relevant): rack-test 3.39.1
Expected Behavior
Calling Capybara::RackTest::Form.new(page.driver, form.native).submit({}) when driver is Capybara::RackTest::Driver should not throw an exception.
Actual Behavior
Exception is thrown because of change in this commit a3ff551 where it is assumed that the driver will be a browser.
ArgumentError:
wrong number of arguments (given 4, expected 3)
# /bundle/ruby/3.1.0/gems/capybara-3.39.1/lib/capybara/rack_test/driver.rb:53:in `submit'
# /bundle/ruby/3.1.0/gems/capybara-3.39.1/lib/capybara/rack_test/form.rb:57:in `submit'
Steps to reproduce
Capybara::RackTest::Form.new(page.driver, form.native).submit({}) with Capybara::RackTest::Driver
Please search previous issues - this is as designed. If you are testing behavior that requires JS use a JS capable driver