Class: AePageObjects::Document

Inherits:
Node
  • Object
show all
Includes:
Concerns::Visitable
Defined in:
lib/ae_page_objects/document.rb

Constant Summary

Constants included from Node::Methods

Node::Methods::METHODS_TO_DELEGATE_TO_NODE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Visitable

included

Methods included from Dsl

#collection, #element, #form_for, #inherited

Methods included from InternalHelpers

#ensure_class_for_param!

Methods included from Node::ClassMethods

#current_url, #current_url_without_params, #new_subclass

Methods included from Concerns::Staleable

#node, #stale?

Methods included from Node::Methods

#current_url, #current_url_without_params, #node

Constructor Details

#initializeDocument

Returns a new instance of Document.



7
8
9
10
11
12
# File 'lib/ae_page_objects/document.rb', line 7

def initialize
  super(Capybara.current_session)

  @window = browser.current_window
  @window.current_document = self
end

Instance Attribute Details

#windowObject (readonly)

Returns the value of attribute window.



5
6
7
# File 'lib/ae_page_objects/document.rb', line 5

def window
  @window
end

Instance Method Details

#browserObject



14
15
16
# File 'lib/ae_page_objects/document.rb', line 14

def browser
  AePageObjects.browser
end

#documentObject



18
19
20
# File 'lib/ae_page_objects/document.rb', line 18

def document
  self
end