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

Instance Method Details

#add_new_poolObject

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

#assessmentsObject

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.

Parameters:

  • name (String)

    the name of the pool you want to edit



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

#importObject

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_namesObject

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