Sha256: 89ccb7508d9a389f6da91992558f9311ffc8155cfca198e995f3ec6e7b559f83

Contents?: true

Size: 325 Bytes

Versions: 7

Compression:

Stored size: 325 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")
      Capybara::Mechanize::Form.new(driver, form).submit(self)
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
capybara-mechanize-1.1.0 lib/capybara/mechanize/node.rb
capybara-mechanize-1.0.2 lib/capybara/mechanize/node.rb
capybara-mechanize-1.0.1 lib/capybara/mechanize/node.rb
capybara-mechanize-1.0.0 lib/capybara/mechanize/node.rb
capybara-mechanize-0.4.0.rc1 lib/capybara/mechanize/node.rb
ryansch-capybara-mechanize-1.0.1 lib/capybara/mechanize/node.rb
ryansch-capybara-mechanize-1.0.0 lib/capybara/mechanize/node.rb