Class: TopicPage

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/forums.rb

Instance Method Summary collapse

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

#display_entire_messageObject



109
110
111
112
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 109

def display_entire_message
  frm.link(:text=>"Display Entire Message").click
  TopicPage.new(@browser)
end

#open_message(message_title) ⇒ Object



104
105
106
107
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 104

def open_message(message_title)
  frm.div(:class=>"portletBody").link(:text=>message_title).click
  ViewForumThread.new(@browser)
end

#post_new_threadObject



90
91
92
93
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 90

def post_new_thread
  frm.link(:text=>"Post New Thread").click
  ComposeForumMessage.new(@browser)
end

#thread_titlesObject



95
96
97
98
99
100
101
102
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 95

def thread_titles
  titles = []
  message_table = frm.table(:id=>"msgForum:messagesInHierDataTable")
  1.upto(message_table.rows.size-1) do |x|
    titles << message_table[x][1].span(:class=>"firstChild").link(:index=>0).text
  end
  return titles
end