Class: QuestionPoolsList
- Inherits:
-
Object
- Object
- QuestionPoolsList
- Includes:
- PageObject
- Defined in:
- lib/sakai-oae-test-api/cle_frame_classes.rb
Overview
The page with the list of existing Question Pools
Instance Method Summary collapse
-
#add_new_pool ⇒ Object
Clicks the Add New Pool link, then instantiates the AddQuestionPool page class.
-
#assessments ⇒ Object
Clicks the Assessments link and then instantiates the AssessmentsList page class.
-
#edit_pool(name) ⇒ Object
Clicks the edit button, then instantiates the EditQuestionPool page class.
-
#import ⇒ Object
Clicks “Import” and then instantiates the PoolImport page class.
-
#pool_names ⇒ Object
Returns an array containing strings of the pool names listed on the page.
Methods included from PageObject
#method_missing, #name_li, #name_link
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageObject
Instance Method Details
#add_new_pool ⇒ Object
Clicks the Add New Pool link, then instantiates the AddQuestionPool page class.
859 860 861 862 863 864 865 866 |
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 859 def add_new_pool #puts "clicking add new pool..." #10.times {frm.link(:text=>"Add New Pool").flash} frm.link(:text=>"Add New Pool").click #puts "clicked..." #frm.text_field(:id=>"questionpool:namefield").wait_until_present(200) AddQuestionPool.new(@browser) end |
#assessments ⇒ Object
Clicks the Assessments link and then instantiates the AssessmentsList page class.
889 890 891 892 |
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 889 def assessments frm.link(:text=>"Assessments").click AssessmentsList.new(@browser) end |
#edit_pool(name) ⇒ Object
Clicks the edit button, then instantiates the EditQuestionPool page class.
852 853 854 855 |
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 852 def edit_pool(name) frm.span(:text=>name).fire_event("onclick") EditQuestionPool.new(@browser) end |
#import ⇒ Object
Clicks “Import” and then instantiates the PoolImport page class.
882 883 884 885 |
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 882 def import frm.link(:text=>"Import").click PoolImport.new(@browser) end |
#pool_names ⇒ Object
Returns an array containing strings of the pool names listed on the page.
870 871 872 873 874 875 876 877 878 |
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 870 def pool_names names= [] frm.table(:id=>"questionpool:TreeTable").rows.each do | row | if row.span(:id=>/questionpool.+poolnametext/).exist? names << row.span(:id=>/questionpool.+poolnametext/).text end end return names end |