Allow SeleniumSession's click_button to be called without an argument without blowing up.
This commit is contained in:
parent
492a301449
commit
f3dfa329b5
@ -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 ||= '*'
|
||||
|
Loading…
Reference in New Issue
Block a user