lib/kelp/navigation.rb
# Press a button on the page.
#
# @example
#   press "Cancel"
#   press "Submit", :within => "#survey"
#
# @param [String] button
#   Capybara locator expression (id, name, or button text)
# @param [Hash] scope
#   Scoping keywords as understood by {#in_scope}
#
Press a button on the page.
Press a button on the page .
def press(button, scope={})
      in_scope(scope) do
        begin
          click_button(button)
        rescue Capybara::ElementNotFound
          raise Kelp::MissingButton,
            "No button with value, id or text '#{button}' found"
        end
      end
    end
def press ( button , scope = { } ) in_scope ( scope ) do begin click_button ( button ) rescue Capybara :: ElementNotFound raise Kelp :: MissingButton , "No button with value, id or text '#{button}' found" end end end
Press a button on the page.
Press a button on the page .
button
<not_specific>
scope
<not_specific>
<not_specific>
scope Scoping keywords as understood by {#in_scope}
scope Scoping keywords as understood by { #in_scope }
example
press "Cancel" press "Submit", :within => "#survey"
press " Cancel " press " Submit " : within = > " #survey "