Class: AePageObjects::SingleWindow::SameWindowLoaderStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/ae_page_objects/single_window/same_window_loader_strategy.rb

Instance Method Summary collapse

Instance Method Details

#document_not_loaded_error_message(query) ⇒ Object



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

def document_not_loaded_error_message(query)
  "Current window does not contain document with type in #{query.permitted_types_dump}."
end

#load_document_with_condition(condition) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/ae_page_objects/single_window/same_window_loader_strategy.rb', line 4

def load_document_with_condition(condition)
  document = load_document(condition.document_class)

  if document && condition_matches?(document, condition)
    document
  else
    nil
  end
end