Class: AePageObjects::SingleWindow::Window
- Inherits:
-
Object
- Object
- AePageObjects::SingleWindow::Window
- Defined in:
- lib/ae_page_objects/single_window/window.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#current_document ⇒ Object
Returns the value of attribute current_document.
Instance Method Summary collapse
- #change_to(*document_classes, &block) ⇒ Object
-
#initialize ⇒ Window
constructor
A new instance of Window.
Constructor Details
#initialize ⇒ Window
Returns a new instance of Window.
12 13 14 |
# File 'lib/ae_page_objects/single_window/window.rb', line 12 def initialize @current_document = nil end |
Instance Attribute Details
#current_document ⇒ Object
Returns the value of attribute current_document.
10 11 12 |
# File 'lib/ae_page_objects/single_window/window.rb', line 10 def current_document @current_document end |
Instance Method Details
#change_to(*document_classes, &block) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/ae_page_objects/single_window/window.rb', line 21 def change_to(*document_classes, &block) query = DocumentQuery.new(*document_classes, &block) document_loader = DocumentLoader.new(query, SameWindowLoaderStrategy.new) loaded_page = document_loader.load DocumentProxy.new(loaded_page, query) end |