alias click_link/clicks_link, and click_button/clicks_button

This commit is contained in:
Lee Bankewitz 2008-10-13 18:43:36 -04:00
parent bf924ba128
commit f7cf981a75
1 changed files with 2 additions and 0 deletions

View File

@ -28,11 +28,13 @@ module Webrat
@selenium.click("button=#{button_text}") @selenium.click("button=#{button_text}")
wait_for_result(options[:wait]) wait_for_result(options[:wait])
end end
alias_method :click_button, :clicks_button
def clicks_link(link_text, options = {}) def clicks_link(link_text, options = {})
@selenium.click("webratlink=#{link_text}") @selenium.click("webratlink=#{link_text}")
wait_for_result(options[:wait]) wait_for_result(options[:wait])
end end
alias_method :click_link, :clicks_link
def clicks_link_within(selector, link_text, options = {}) def clicks_link_within(selector, link_text, options = {})
@selenium.click("webratlinkwithin=#{selector}|#{link_text}") @selenium.click("webratlinkwithin=#{selector}|#{link_text}")