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.
6 7 8 9 10 11 12 13 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 6 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.
4 5 6 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 4 def handle @handle end |
Instance Method Details
#close ⇒ Object
20 21 22 23 24 25 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 20 def close if WindowHandleManager.close(@handle) self.current_document = nil @registry.remove(self) end end |
#switch_to ⇒ Object
15 16 17 18 |
# File 'lib/ae_page_objects/multiple_windows/window.rb', line 15 def switch_to WindowHandleManager.switch_to(handle) current_document end |