Class: AssessmentsBase

Inherits:
BasePage
  • Object
show all
Defined in:
lib/sambal-cle/page_objects/assessments.rb

Overview

Base Class for building Assessments

Class Method Summary collapse

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Class Method Details



11
12
13
14
15
16
17
18
# File 'lib/sambal-cle/page_objects/assessments.rb', line 11

def menu_bar_elements
  link("Assessments")
  link("Assessment Types")
  # Clicks the Question Pools link, goes to
  # the QuestionPoolsList class.
  link("Question Pools")
  action(:questions) { |b| b.frm.link(:text=>/Questions:/).click }
end

.pool_page_elementsObject



30
31
32
33
34
35
36
37
38
# File 'lib/sambal-cle/page_objects/assessments.rb', line 30

def pool_page_elements
  element(:pool_name) { |b| b.frm.text_field(:id=>/:namefield/) }
  element(:department_group) { |b| b.frm.text_field(:id=>/:orgfield/) }
  element(:description) { |b| b.frm.text_field(:id=>/:descfield/) }
  element(:objectives) { |b| b.frm.text_field(:id=>/:objfield/) }
  element(:keywords) { |b| b.frm.text_field(:id=>/:keyfield/) }
  # QuestionPoolsList
  action(:save) { |b| b.frm.button(:id=>"questionpool:submit").click }
end

.question_page_elementsObject



20
21
22
23
24
25
26
27
28
# File 'lib/sambal-cle/page_objects/assessments.rb', line 20

def question_page_elements
  element(:answer_point_value) { |b| b.frm.text_field(:id=>"itemForm:answerptr") }
  element(:assign_to_part) { |b| b.frm.select(:id=>"itemForm:assignToPart") }
  element(:assign_to_pool) { |b| b.frm.select(:id=>"itemForm:assignToPool") }
  element(:question_text) { |b| b.frm.text_field(:class=>"simple_text_area", :index=>0) }
  button("Save")
  action(:cancel) { |b| b.frm.button(:id=>"itemForm:_id63").click }
  button("Add Attachments")
end