Class: AssignmentsPreview
- Inherits:
-
AssignmentsBase
- Object
- PageMaker
- BasePage
- AssignmentsBase
- AssignmentsPreview
- Defined in:
- lib/sakai-cle-test-api/page_objects/assignments.rb
Overview
Page that appears when you click to preview an Assignment
Instance Method Summary collapse
-
#assignment_instructions ⇒ Object
Grabs the Assignment Instructions text.
- #back_to_list ⇒ Object
-
#cancel ⇒ Object
Clicks the Cancel button and instantiates the AssignmentsList Class.
-
#header ⇒ Object
Returns the text content of the page header.
-
#instructor_comments ⇒ Object
Grabs the instructor comments text.
-
#item_summary ⇒ Object
Returns a hash object containing the contents of the Item Summary table.
-
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
Methods inherited from AssignmentsBase
listview_elements, menu_elements
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
#assignment_instructions ⇒ Object
Grabs the Assignment Instructions text.
366 367 368 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 366 def assignment_instructions frm.div(:class=>"textPanel").text end |
#back_to_list ⇒ Object
376 377 378 379 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 376 def back_to_list frm.(:value=>"Back to list").click AssignmentsList.new(@browser) end |
#cancel ⇒ Object
Clicks the Cancel button and instantiates the AssignmentsList Class.
390 391 392 393 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 390 def cancel frm.(:value=>"Cancel").click AssignmentsList.new(@browser) end |
#header ⇒ Object
Returns the text content of the page header
351 352 353 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 351 def header frm.div(:class=>"portletBody").h3.text end |
#instructor_comments ⇒ Object
Grabs the instructor comments text.
371 372 373 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 371 def instructor_comments frm.div(:class=>"portletBody").div(:class=>"textPanel", :index=>2).text end |
#item_summary ⇒ Object
Returns a hash object containing the contents of the Item Summary table. The hash’s Key is the header column and the value is the content column.
357 358 359 360 361 362 363 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 357 def item_summary hash = {} frm.table(:class=>"itemSummary").rows.each do |row| hash.store(row.th.text, row.td.text) end return hash end |
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
383 384 385 386 |
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 383 def post frm.(:name=>"post").click AssignmentsList.new(@browser) end |