Class: NewTopic
- Includes:
- JForumsResources
- Defined in:
- lib/sakai-cle-test-api/page_objects/jforums.rb
Overview
The page for adding a new discussion topic.
Instance Method Summary collapse
-
#filename1(filename, filepath = "") ⇒ Object
Enters the specified filename in the file field.
-
#filename2(filename) ⇒ Object
Enters the specified filename in the file field.
-
#message_text=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Message.
-
#preview ⇒ Object
Clicks the Preview button and instantiates the PreviewDiscussionTopic Class.
-
#submit ⇒ Object
Clicks the Submit button, then instantiates the ViewTopic Class.
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
#filename1(filename, filepath = "") ⇒ Object
Enters the specified filename in the file field. The path to the file can be entered as an optional second parameter
229 230 231 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 229 def filename1(filename, filepath="") frm.file_field(:name=>"file_0").set(filepath + filename) end |
#filename2(filename) ⇒ Object
Enters the specified filename in the file field.
Note that the file should be inside the data/sakai-cle-test-api folder. The file or folder name used for the filename variable should not include a preceding / character.
238 239 240 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 238 def filename2(filename) frm.file_field(:name=>"file_1").set(File.(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename) end |
#message_text=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Message.
211 212 213 214 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 211 def (text) frm.frame(:id, "message___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(:home) frm.frame(:id, "message___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text) end |
#preview ⇒ Object
Clicks the Preview button and instantiates the PreviewDiscussionTopic Class.
223 224 225 226 |
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 223 def preview frm.(:value=>"Preview").click PreviewDiscussionTopic.new(@browser) end |