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, frame_element
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.
812 813 814 815 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 812 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.
796 797 798 799 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 796 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.
802 803 804 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 802 def true_false_rationale(text) frm.text_field(:name=>/:deliverTrueFalse:rationale/).value=text end |