Class: Polls
- Defined in:
- lib/sakai-cle-test-api/page_objects/polls.rb
Instance Method Summary collapse
-
#list ⇒ Object
Returns an array containing the list of poll questions displayed.
- #questions ⇒ Object
Methods inherited from BasePage
basic_page_elements, frame_element
Methods inherited from PageMaker
element, expected_element, expected_title, #initialize, #method_missing, page_url
Constructor Details
This class inherits a constructor from PageMaker
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageMaker
Instance Method Details
#list ⇒ Object
Returns an array containing the list of poll questions displayed.
21 22 23 24 25 26 27 28 |
# File 'lib/sakai-cle-test-api/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 |
#questions ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/sakai-cle-test-api/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 |