Class: EditMatrixCells

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/matrix.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

#edit(row, column) ⇒ Object

Clicks on the cell that is specified, based on the row number, then the column number.

Note that the numbering begins in the upper left of the Matrix, with (1, 1) being the first EDITABLE cell, NOT the first cell in the table itself.

In other words, ignore the header row and header column in your count (or, if you prefer, consider those to be numbered “0”).



157
158
159
160
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 157

def edit(row, column)
  frm.div(:class=>"portletBody").table(:summary=>"Matrix Scaffolding (click on a cell to edit)").tr(:index=>row).td(:index=>column-1).fire_event("onclick")
  EditCell.new(@browser)
end

#return_to_listObject

Clicks the “Return to List” link and instantiates the Matrices Class.



164
165
166
167
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 164

def return_to_list
  frm.link(:text=>"Return to List").click
  Matrices.new(@browser)
end