Module: PollsMethods

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

Instance Method Summary collapse

Instance Method Details

#addObject



3
4
5
6
7
# File 'lib/kuali-sakai-common-lib/polls.rb', line 3

def add
  frm.link(:text=>"Add").click
  frm.frame(:id, "newpolldescr::input___Frame").td(:id, "xEditingArea").wait_until_present
  AddEditPoll.new(@browser)
end

#edit(poll) ⇒ Object



10
11
12
# File 'lib/kuali-sakai-common-lib/polls.rb', line 10

def edit(poll)

end

#listObject

Returns an array containing the list of poll questions displayed.



23
24
25
26
27
28
29
30
# File 'lib/kuali-sakai-common-lib/polls.rb', line 23

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



14
15
16
17
18
19
20
# File 'lib/kuali-sakai-common-lib/polls.rb', line 14

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