def click_button_with_value(value, opts={})
        if opts && opts[:index]
          wait_before_and_after { button(:value => value, :index => opts[:index]).click }
        else
          wait_before_and_after { button(:value, value).click }
        end
    end
def click_button_with_value(value, opts={})
        if opts && opts[:index]
          wait_before_and_after { button(:value => value, :index => opts[:index]).click }
        else
          wait_before_and_after { button(:value, value).click }
        end
    end
Click a button with value
 Usage:
   click_button_with_value("Confirm payment")