Module: Cucumber::Rails::CapybaraJavascriptEmulation
- Included in:
- Capybara::RackTest::Node
- Defined in:
- lib/cucumber/rails/capybara_javascript_emulation.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/cucumber/rails/capybara_javascript_emulation.rb', line 4 def self.included(base) base.class_eval do alias_method :click_without_javascript_emulation, :click alias_method :click, :click_with_javascript_emulation end end |
Instance Method Details
#click_with_javascript_emulation ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/cucumber/rails/capybara_javascript_emulation.rb', line 11 def click_with_javascript_emulation if link_with_non_get_http_method? Capybara::RackTest::Form.new(driver, js_form(element_node.document, self[:href], emulated_method)).submit(self) else click_without_javascript_emulation end end |