Class: AePageObjects::MultipleWindows::Window
- Inherits:
-
SingleWindow::Window
- Object
- SingleWindow::Window
- AePageObjects::MultipleWindows::Window
- Defined in:
- lib/ae_page_objects/multiple_windows/window.rb
Instance Attribute Summary collapse
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
Attributes inherited from SingleWindow::Window
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(registry, handle) ⇒ Window
constructor
A new instance of Window.
- #switch_to ⇒ Object
Methods inherited from SingleWindow::Window
Constructor Details
#initialize(registry, handle) ⇒ Window
Returns a new instance of Window.
10 11 12 13 14 15 16 17 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 10 def initialize(registry, handle) @registry = registry @handle = handle @registry.add(self) super() end |
Instance Attribute Details
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
8 9 10 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 8 def handle @handle end |
Instance Method Details
#close ⇒ Object
24 25 26 27 28 29 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 24 def close if WindowHandleManager.close(@handle) self.current_document = nil @registry.remove(self) end end |
#switch_to ⇒ Object
19 20 21 22 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 19 def switch_to WindowHandleManager.switch_to(handle) current_document end |