Class: Polls

Inherits:
BasePage show all
Defined in:
lib/sambal-cle/page_objects/polls.rb

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#listObject

Returns an array containing the list of poll questions displayed.



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

def list
  list = []
  frm.table(:id=>"sortableTable").rows.each_with_index do |row, index|
    next if index==0
    list << row[0].link(:href=>/voteQuestion/).text
  end
  return list
end

#questionsObject



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

def questions
  questions = []
  frm.table(:id=>"sortableTable").rows.each do |row|
    questions << row[0].link.text
  end
  return questions
end