lib/page-object/platforms/watir/page_object.rb
def confirm(response, frame=nil, &block)
          switch_to_frame(frame)
          yield
          value = nil
          if @browser.alert.exists?
            value = @browser.alert.text
            response ? @browser.alert.ok : @browser.alert.close
          end
          switch_to_default_content(frame)
          value
        end
#
# platform method to handle a confirm popup
# See PageObject#confirm
#
platform method to handle a confirm popup
See PageObject#confirm
platform method to handle a confirm popup See PageObject#confirm
def confirm(response, frame=nil, &block)
          switch_to_frame(frame)
          yield
          value = nil
          if @browser.alert.exists?
            value = @browser.alert.text
            response ? @browser.alert.ok : @browser.alert.close
          end
          switch_to_default_content(frame)
          value
        end
def confirm ( response , frame = nil , & block ) switch_to_frame ( frame ) yield value = nil if @browser . alert . exists? value = @browser . alert . text response ? @browser . alert . ok : @browser . alert . close end switch_to_default_content ( frame ) value end
platform method to handle a confirm popup
See PageObject#confirm
platform method to handle a confirm popup See PageObject#confirm
response
frame
block