# File lib/webrat/selenium/selenium_session.rb, line 71 def click_button(button_text_or_regexp = nil, options = {}) if button_text_or_regexp.is_a?(Hash) && options == {} pattern, options = nil, button_text_or_regexp elsif button_text_or_regexp pattern = adjust_if_regexp(button_text_or_regexp) end pattern ||= '*' locator = "button=#{pattern}" selenium.wait_for_element locator, :timeout_in_seconds => 5 selenium.click locator end