Class: Gradebook

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

Overview

The topmost page in a Site’s Gradebook

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

#due_date(assignment) ⇒ Object

Returns the due date value for the specified assignment.



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

def due_date(assignment)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(assignment)}/)[3].text
end

#items_titlesObject



10
11
12
13
14
15
16
17
# File 'lib/sakai-cle-test-api/page_objects/gradebook.rb', line 10

def items_titles
  titles = []
  items_table = frm.table(:class=>"listHier lines nolines")
  1.upto(items_table.rows.size-1) do |x|
    titles << items_table.row(:index=>x).a(:index=>0).text
  end
  return titles
end

#released_to_students(assignment) ⇒ Object

Returns the value of the “Released to Students” column for the specified assignment title.



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

def released_to_students(assignment)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(assignment)}/)[4].text
end