Module: PageHelper

Instance Method Summary collapse

Instance Method Details

#make(data_object_class, opts = {}) ⇒ Object



14
15
16
# File 'lib/sakai-cle-test-api/page_helper.rb', line 14

def make data_object_class, opts={}
  data_object_class.new @browser, opts
end

#on(page_class, visit = false, &block) ⇒ Object Also known as: on_page



7
8
9
10
11
# File 'lib/sakai-cle-test-api/page_helper.rb', line 7

def on page_class, visit=false, &block
  @current_page = page_class.new @browser, visit
  block.call @current_page if block
  @current_page
end

#visit(page_class, &block) ⇒ Object



3
4
5
# File 'lib/sakai-cle-test-api/page_helper.rb', line 3

def visit page_class, &block
  on page_class, true, &block
end

#wait_until(timeout = 30, message = nil, &block) ⇒ Object



18
19
20
# File 'lib/sakai-cle-test-api/page_helper.rb', line 18

def wait_until(timeout=30, message=nil, &block)
  Object::Watir::Wait.until(timeout, message, &block)
end