Module: PreviewOverviewMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/assessments.rb

Overview

Page that appears when previewing an assessment. It shows the basic information about the assessment.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object

Encapsulates all the PageObject code into a module method that can be called from the necessary class.



168
169
170
171
172
173
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 168

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    button(:begin_assessment, :id=>"takeAssessmentForm:beginAssessment3", :frame=>frame)

  end
end

Instance Method Details

#doneObject

Clicks the Done button, then instantiates the EditAssessment class.



160
161
162
163
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 160

def done
  frm.button(:name=>"takeAssessmentForm:_id5").click
  EditAssessment.new(@browser)
end

#due_dateObject

Scrapes the value of the due date from the page. Returns it as a string.



139
140
141
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 139

def due_date
  frm.div(:class=>"tier2").table(:index=>0)[0][0].text
end

#feedbackObject

Scrapes the Feedback policy from the page. Returns it as a string.



154
155
156
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 154

def feedback
  frm.div(:class=>"tier2").table(:index=>0)[9][0].text
end

#submission_limitObject

Scrapes the submission limit from the page. Returns it as a string.



149
150
151
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 149

def submission_limit
  frm.div(:class=>"tier2").table(:index=>0)[6][0].text
end

#time_limitObject

Scrapes the value of the time limit from the page. Returns it as a string.



144
145
146
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 144

def time_limit
  frm.div(:class=>"tier2").table(:index=>0)[3][0].text
end