Module: AssignmentsPreviewMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/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.
Instance Method Details
#assignment_instructions ⇒ Object
Grabs the Assignment Instructions text.
395 396 397 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 395 def assignment_instructions frm.div(:class=>"textPanel").text end |
#back_to_list ⇒ Object
405 406 407 408 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 405 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.
419 420 421 422 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 419 def cancel frm.(:value=>"Cancel").click AssignmentsList.new(@browser) end |
#header ⇒ Object
Returns the text content of the page header
380 381 382 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 380 def header frm.div(:class=>"portletBody").h3.text end |
#instructor_comments ⇒ Object
Grabs the instructor comments text.
400 401 402 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 400 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.
386 387 388 389 390 391 392 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 386 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.
412 413 414 415 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 412 def post frm.(:name=>"post").click AssignmentsList.new(@browser) end |