Module: HtmlUnit::ConfirmHandler

Defined in:
lib/akephalos/htmlunit/ext/confirm_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#handleConfirmValueObject

Boolean - true for ok, false for cancel



7
8
9
# File 'lib/akephalos/htmlunit/ext/confirm_handler.rb', line 7

def handleConfirmValue
  @handleConfirmValue
end

#textObject (readonly)

last confirmation’s message



10
11
12
# File 'lib/akephalos/htmlunit/ext/confirm_handler.rb', line 10

def text
  @text
end

Instance Method Details

#handleConfirm(page, message) ⇒ Object

handleConfirm will be called by htmlunit on a confirm, so store the message.



13
14
15
16
# File 'lib/akephalos/htmlunit/ext/confirm_handler.rb', line 13

def handleConfirm(page, message)
  @text = message
  return handleConfirmValue.nil? ? true : handleConfirmValue
end