Module: AssignmentAddMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/assignments.rb
Overview
The page where you create a new assignment
Instance Method Summary collapse
-
#add_attachments ⇒ Object
Clicks the Add Attachments button, then instantiates the AssignmentAttachments page class.
-
#alert_text ⇒ Object
Grabs the text contained in the alert box when it is present on the page (will throw an error if called when the box is not present).
-
#cancel ⇒ Object
Clicks the Cancel button, then instantiates the AssignmentsList page class.
-
#gradebook_warning ⇒ Object
This is the warning message that appears when you select to add an assignment to the gradebook.
-
#instructions=(instructions) ⇒ Object
Sends the specified text to the text box in the FCKEditor on the page.
-
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
-
#preview ⇒ Object
Clicks the Preview button, then instantiates the AssignmentsPreview page class.
-
#save_draft ⇒ Object
Clicks the Save Draft button, then instantiates the AssignmentsList page class.
Instance Method Details
#add_attachments ⇒ Object
Clicks the Add Attachments button, then instantiates the AssignmentAttachments page class.
201 202 203 204 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 201 def frm.(:value=>"Add Attachments").click AssignmentAttachments.new(@browser) end |
#alert_text ⇒ Object
Grabs the text contained in the alert box when it is present on the page (will throw an error if called when the box is not present).
175 176 177 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 175 def alert_text frm.div(:class=>"portletBody").div(:class=>"alertMessage").text end |
#cancel ⇒ Object
Clicks the Cancel button, then instantiates the AssignmentsList page class.
160 161 162 163 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 160 def cancel frm.(:value=>"Cancel", :index=>-1).click AssignmentsList.new(@browser) end |
#gradebook_warning ⇒ Object
This is the warning message that appears when you select to add an assignment to the gradebook.
195 196 197 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 195 def gradebook_warning frm.div(:class, "portletBody").span(:id, "gradebookListWarnAssoc") end |
#instructions=(instructions) ⇒ Object
Sends the specified text to the text box in the FCKEditor on the page.
181 182 183 184 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 181 def instructions=(instructions) frm.frame(:id, "new_assignment_instructions___Frame").td(:id, "xEditingArea").frame(:index=>0).wait_until_present frm.frame(:id, "new_assignment_instructions___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(instructions) end |
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
153 154 155 156 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 153 def post frm.(:value=>"Post").click AssignmentsList.new(@browser) end |
#preview ⇒ Object
Clicks the Preview button, then instantiates the AssignmentsPreview page class.
188 189 190 191 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 188 def preview frm.(:value=>"Preview").click AssignmentsPreview.new(@browser) end |
#save_draft ⇒ Object
Clicks the Save Draft button, then instantiates the AssignmentsList page class.
167 168 169 170 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 167 def save_draft frm.(:name=>"save").click AssignmentsList.new(@browser) end |