Class: AutomationObject::State::CloseModal

Inherits:
ActionLoop
  • Object
show all
Defined in:
lib/automation_object/state/hook_actions/close_modal.rb

Overview

Close modal hook loop

Instance Attribute Summary

Attributes inherited from ActionLoop

#blue_prints, #composite, #driver, #loops

Instance Method Summary collapse

Methods inherited from ActionLoop

#initialize, #run

Constructor Details

This class inherits a constructor from AutomationObject::State::ActionLoop

Instance Method Details

#single_runObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/automation_object/state/hook_actions/close_modal.rb', line 10

def single_run
  return false unless driver.document_complete?

  raise ModalParentExpected unless composite.parent.is_a?(Modal)

  return false if modal.live? == false

  modal.deactivate
  true
end