Module: QuestionPoolsListMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/assessments.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.
Instance Method Details
#add_new_pool ⇒ Object
Clicks the Add New Pool link, then instantiates the AddQuestionPool page class.
808 809 810 811 812 813 814 815 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 808 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.
838 839 840 841 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 838 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.
801 802 803 804 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 801 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.
831 832 833 834 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 831 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.
819 820 821 822 823 824 825 826 827 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 819 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 |