Class: AssignmentStudentPreview

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

Overview

Page that appears when a Student User clicks to Preview an assignment that is in progress.

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

#attachmentsObject

Returns an array of strings. Each element in the array is the name of attached files.



593
594
595
596
597
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 593

def attachments
  names = []
  frm.ul(:class=>"attachList indnt1").links.each { |link| names << link.text }
  return names
end

#save_draftObject

Clicks the Save Draft button, then instantiates the SubmissionConfirmation page class.



581
582
583
584
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 581

def save_draft
  frm.button(:value=>"Save Draft").click
  SubmissionConfirmation.new(@browser)
end

#submission_textObject

Returns the contents of the submission box.



587
588
589
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 587

def submission_text
  frm.div(:class=>"portletBody").div(:class=>/textPanel/).text
end

#submitObject

Clicks the Submit button, then instantiates the SubmissionConfirmation page class.



573
574
575
576
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 573

def submit
  frm.button(:value=>"Submit").click
  SubmissionConfirmation.new(@browser)
end