Method: Webrat::SeleniumSession#click_button
- Defined in:
- lib/webrat/selenium/selenium_session.rb
#click_button(button_text_or_regexp = nil, options = {}) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/webrat/selenium/selenium_session.rb', line 66 def ( = nil, = {}) if .is_a?(Hash) && == {} pattern, = nil, elsif pattern = adjust_if_regexp() end pattern ||= '*' locator = "button=#{pattern}" selenium.wait_for_element locator, :timeout_in_seconds => 5 selenium.click locator end |