Class: SakaiOAE

Inherits:
Object
  • Object
show all
Defined in:
lib/sakai-oae-test-api.rb

Overview

Initialize this class at the start of your test cases to open the specified test browser at the specified Sakai welcome page URL.

The initialization will return the LoginPage class object as well as create the @browser variable used throughout the page classes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(web_browser, url) ⇒ SakaiOAE

Returns a new instance of SakaiOAE.



29
30
31
32
33
34
# File 'lib/sakai-oae-test-api.rb', line 29

def initialize(web_browser, url)
  @browser = Watir::Browser.new web_browser
  @browser.window.resize_to(1400,900)
  @browser.goto url
  @browser.button(:id=>"footer_logo_button").wait_until_present
end

Instance Attribute Details

#browserObject (readonly)

Returns the value of attribute browser.



27
28
29
# File 'lib/sakai-oae-test-api.rb', line 27

def browser
  @browser
end

Instance Method Details

#pageObject



36
37
38
# File 'lib/sakai-oae-test-api.rb', line 36

def page
  LoginPage.new @browser
end