module Capybara module Node module Actions ## # # Finds a button or link by id, text or value and clicks it. Also looks at image # alt text inside the link. # # @param [String] locator Text, id or value of link or button # def click_link_or_button(locator, options={}) find(:link_or_button, locator, options).click end alias_method :click_on, :click_link_or_button ## # # Finds a link by id, text or title and clicks it. Also looks at image # alt text inside the link. # # @param [String] locator text, id, title or nested image's alt attribute # @param options See {Capybara::Node::Finders#find_link} # def click_link(locator, options={}) find(:link, locator, options).click end ## # # Finds a button on the page and clicks it. # This can be any \ element of type submit, reset, image, button or it can be a # \