Sha256: ba3776f3c9bba5856ea2662251a3f828ef5134795f2716904bccc0cd7b653945

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

class Capybara::Mechanize::Node < Capybara::RackTest::Node
  def click
    if tag_name == 'a'
      super
    elsif (tag_name == 'input' and %w(submit image).include?(type)) or
        ((tag_name == 'button') and type.nil? or type == "submit")
      associated_form = form
      Capybara::Mechanize::Form.new(driver, form).submit(self) if associated_form
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capybara-mechanize-1.6.0 lib/capybara/mechanize/node.rb
capybara-mechanize-1.5.0 lib/capybara/mechanize/node.rb
capybara-mechanize-1.4.1 lib/capybara/mechanize/node.rb
capybara-mechanize-1.4.0 lib/capybara/mechanize/node.rb