Class: TakeAssessment
- Inherits:
-
AssessmentsBase
- Object
- PageFactory
- BasePage
- AssessmentsBase
- TakeAssessment
- Defined in:
- lib/sambal-cle/page_objects/assessments.rb
Overview
Pages student sees when taking an assessment Note that this class will only work when the Assessment being taken is set up to only display one question per page.
Instance Method Summary collapse
-
#file_answer(file_name, file_path = "") ⇒ Object
Enters the specified file name in the file field.
-
#true_false_answer(answer) ⇒ Object
Clicks either the True or the False radio button, as specified.
-
#true_false_rationale(text) ⇒ Object
Enters the specified string into the Rationale text box.
Methods inherited from AssessmentsBase
menu_bar_elements, pool_page_elements, question_page_elements
Methods inherited from BasePage
basic_page_elements, button, damballa, frame_element, link
Instance Method Details
#file_answer(file_name, file_path = "") ⇒ Object
Enters the specified file name in the file field. You can include the path to the file as an optional second parameter.
788 789 790 791 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 788 def file_answer(file_name, file_path="") frm.file_field(:name=>/deliverFileUpload/).set(file_path + file_name) frm.(:value=>"Upload").click end |
#true_false_answer(answer) ⇒ Object
Clicks either the True or the False radio button, as specified.
772 773 774 775 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 772 def true_false_answer(answer) answer.upcase=~/t/i ? index = 0 : index = 1 frm.radio(:name=>/deliverTrueFalse/, :index=>index).set end |
#true_false_rationale(text) ⇒ Object
Enters the specified string into the Rationale text box.
778 779 780 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 778 def true_false_rationale(text) frm.text_field(:name=>/:deliverTrueFalse:rationale/).value=text end |