Class: AssignmentSubmission

Inherits:
BasePage
  • Object
show all
Includes:
FCKEditor
Defined in:
lib/sambal-cle/page_objects/assignments.rb

Overview

The page that shows a student’s submitted assignment to an instructor user.

Instance Method Summary collapse

Methods included from FCKEditor

#enter_source_text, #entity_picker, #get_source_text, #prepend, #select_all, #source, #source_field

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#assignment_text=(text) ⇒ Object

Enters the specified text string in the FCKEditor box for the assignment text.



509
510
511
# File 'lib/sambal-cle/page_objects/assignments.rb', line 509

def assignment_text=(text)
  assignment_submission.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#instructor_comments=(text) ⇒ Object

Enters the specified string into the Instructor Comments FCKEditor box.



520
521
522
# File 'lib/sambal-cle/page_objects/assignments.rb', line 520

def instructor_comments=(text)
  instructor_comments.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#remove_assignment_textObject

Removes all the contents of the FCKEditor Assignment Text box.



514
515
516
517
# File 'lib/sambal-cle/page_objects/assignments.rb', line 514

def remove_assignment_text
  assignment_submission.div(:title=>"Select All").fire_event("onclick")
  assignment_submission.td(:id, "xEditingArea").frame(:index=>0).send_keys :backspace
end