Module: QuestionPoolsListMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/assessments.rb
Overview
The page with the list of existing Question Pools
Class Method Summary collapse
-
.page_elements(identifier) ⇒ Object
Encapsulates all the PageObject code into a module method that can be called from the necessary class.
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.
Class Method Details
.page_elements(identifier) ⇒ Object
Encapsulates all the PageObject code into a module method that can be called from the necessary class.
952 953 954 955 956 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 952 def self.page_elements(identifier) in_frame(identifier) do |frame| link(:assessment_types, :text=>"Assessment Types", :frame=>frame) end end |
Instance Method Details
#add_new_pool ⇒ Object
Clicks the Add New Pool link, then instantiates the AddQuestionPool page class.
914 915 916 917 918 919 920 921 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 914 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.
944 945 946 947 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 944 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.
907 908 909 910 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 907 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.
937 938 939 940 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 937 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.
925 926 927 928 929 930 931 932 933 |
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 925 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 |