Module: AddQuestionPoolMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/assessments.rb

Overview

The Page that appears when adding a new question pool

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object

Encapsulates all the PageObject code into a module method that can be called from the necessary class.



854
855
856
857
858
859
860
861
862
863
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 854

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    text_field(:pool_name, :id=>"questionpool:namefield", :frame=>frame)
    text_field(:department_group, :id=>"questionpool:orgfield", :frame=>frame)
    text_area(:description, :id=>"questionpool:descfield", :frame=>frame)
    text_field(:objectives, :id=>"questionpool:objfield", :frame=>frame)
    text_field(:keywords, :id=>"questionpool:keyfield", :frame=>frame)

  end
end

Instance Method Details

#cancelObject



846
847
848
849
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 846

def cancel
  frm.button(:value=>"Cancel").click
  QuestionPoolsList.new @browser
end

#saveObject

Clicks the Save button, then instantiates the QuestionPoolsList page class.



838
839
840
841
842
843
844
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 838

def save
  #10.times {frm.button(:id=>"questionpool:submit").flash}
  frm.button(:id=>"questionpool:submit").click
  #sleep 180
  #frm.button(:value=>"Create").wait_until_present(120)
  QuestionPoolsList.new(@browser)
end