Class: ViewTopic
- Includes:
- JForumsResources
- Defined in:
- lib/sakai-cle-test-api/page_objects/jforums.rb
Overview
Viewing a Topic/Message
Instance Method Summary collapse
-
#message_text(message_number) ⇒ Object
Gets the message text for the specified message (not zero-based).
-
#post_reply ⇒ Object
Clicks the Post Reply button, then instantiates the NewTopic Class.
-
#quick_reply ⇒ Object
Clicks the Quick Reply button and does not instantiate any page classes.
-
#submit ⇒ Object
Clicks the submit button underneath the Quick Reply box, then re-instantiates the class, due to the page update.
-
#topic_name ⇒ Object
Gets the text of the Topic title.
Methods included from JForumsResources
#discussion_home, #manage, #member_listing, #my_bookmarks, #my_profile, #private_messages, #search
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
#message_text(message_number) ⇒ Object
Gets the message text for the specified message (not zero-based). Useful for verification.
263 264 265 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 263 def () frm.span(:class=>"postbody", :index=>.to_i-1).text end |
#post_reply ⇒ Object
Clicks the Post Reply button, then instantiates the NewTopic Class.
269 270 271 272 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 269 def post_reply frm.image(:alt=>"Post Reply").fire_event("onclick") NewTopic.new(@browser) end |
#quick_reply ⇒ Object
Clicks the Quick Reply button and does not instantiate any page classes.
276 277 278 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 276 def quick_reply frm.image(:alt=>"Quick Reply").fire_event("onclick") end |
#submit ⇒ Object
Clicks the submit button underneath the Quick Reply box, then re-instantiates the class, due to the page update.
282 283 284 285 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 282 def submit frm.(:value=>"Submit").click ViewTopic.new(@browser) end |
#topic_name ⇒ Object
Gets the text of the Topic title. Useful for verification.
257 258 259 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 257 def topic_name frm.link(:id=>"top", :class=>"maintitle").text end |