Class: SakaiCLE

Inherits:
Object
  • Object
show all
Defined in:
lib/sakai-cle-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) ⇒ SakaiCLE

Returns a new instance of SakaiCLE.



20
21
22
23
24
# File 'lib/sakai-cle-test-api.rb', line 20

def initialize(web_browser, url)
  @browser = Watir::Browser.new web_browser
  @browser.window.resize_to(1400,900)
  @browser.goto url
end

Instance Attribute Details

#browserObject (readonly)

include PageObject include ToolsMenu



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

def browser
  @browser
end

Instance Method Details

#pageObject

Returns the class containing the welcome page’s page elements.



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

def page
  Login.new @browser
end