Class: Matrices
- Defined in:
- lib/sakai-cle-test-api/page_objects/matrix.rb
Instance Method Summary collapse
-
#add ⇒ Object
Clicks the Add link and instantiates the AddEditMatrix Class.
-
#edit(matrixname) ⇒ Object
Clicks the “Edit” link for the specified Matrix item, then instantiates the EditMatrixCells.
-
#preview(matrixname) ⇒ Object
Clicks the “Preview” link for the specified Matrix item.
-
#publish(matrixname) ⇒ Object
Clicks the “Publish” link for the specified Matrix item, then instantiates the ConfirmPublishMatrix Class.
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
#add ⇒ Object
Clicks the Add link and instantiates the AddEditMatrix Class.
12 13 14 15 |
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 12 def add frm.link(:text=>"Add").click AddEditMatrix.new(@browser) end |
#edit(matrixname) ⇒ Object
Clicks the “Edit” link for the specified Matrix item, then instantiates the EditMatrixCells.
19 20 21 22 |
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 19 def edit(matrixname) frm.table(:class=>"listHier lines nolines").tr(:text=>/#{Regexp.escape(matrixname)}/).link(:text=>"Edit").click EditMatrixCells.new(@browser) end |
#preview(matrixname) ⇒ Object
Clicks the “Preview” link for the specified Matrix item.
26 27 28 |
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 26 def preview(matrixname) frm.table(:class=>"listHier lines nolines").tr(:text=>/#{Regexp.escape(matrixname)}/).link(:text=>"Preview").click end |
#publish(matrixname) ⇒ Object
Clicks the “Publish” link for the specified Matrix item, then instantiates the ConfirmPublishMatrix Class.
32 33 34 35 |
# File 'lib/sakai-cle-test-api/page_objects/matrix.rb', line 32 def publish(matrixname) frm.table(:class=>"listHier lines nolines").tr(:text=>/#{Regexp.escape(matrixname)}/).link(:text=>"Publish").click ConfirmPublishMatrix.new(@browser) end |