diff --git a/lib/webrat/selenium/selenium_session.rb b/lib/webrat/selenium/selenium_session.rb index a885072..2f2c4af 100644 --- a/lib/webrat/selenium/selenium_session.rb +++ b/lib/webrat/selenium/selenium_session.rb @@ -53,7 +53,7 @@ module Webrat 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 - else + elsif button_text_or_regexp pattern = adjust_if_regexp(button_text_or_regexp) end pattern ||= '*'