Class: Roster

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/rosters.rb

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#findObject



10
11
12
13
# File 'lib/sakai-cle-test-api/page_objects/rosters.rb', line 10

def find
  frm.button(:value=>"Find").click
  Roster.new @browser
end

#namesObject



15
16
17
18
19
20
21
22
# File 'lib/sakai-cle-test-api/page_objects/rosters.rb', line 15

def names
  list = []
  frm.table(:id=>"roster_form:rosterTable").rows.each do |row|
    list << row[0].text
  end
  list.delete_at(0)
  return list
end

#view(name) ⇒ Object

Clicks on the link on the page that matches the specified name. Then instantiates the RosterProfileView class. Note that it expects an exact match for the name string, otherwise the script will error out.



28
29
30
31
# File 'lib/sakai-cle-test-api/page_objects/rosters.rb', line 28

def view(name)
  frm.link(:text=>name).click
  RosterProfileView.new @browser
end