Class: CreateBloggerPost
- Defined in:
- lib/sakai-cle-test-api/page_objects/blogger.rb
Overview
The page where users create a Post for their Blogger blog.
Instance Method Summary collapse
-
#abstract=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Abstract.
-
#add_file_to_document ⇒ Object
Clicks the Add to Document button on the File tab.
-
#add_image_to_document ⇒ Object
Clicks the Add to Document button on the Image tab.
-
#add_link_to_document ⇒ Object
Clicks the Add to Document button on the Link tab.
-
#add_text_to_document ⇒ Object
Clicks the Add to document button in the text tab.
-
#file_field(filename, filepath = "") ⇒ Object
Enters the specified directory/filename in the file field.
-
#image_file(filename, filepath = "") ⇒ Object
Enters the specified filename in the file field for images.
-
#preview ⇒ Object
Clicks the Preview button and instantiates the PreviewBloggerPost Class.
-
#save ⇒ Object
Clicks the Save button and instantiates the Blogger Class.
-
#text=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Text of the Blog.
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
#abstract=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Abstract.
81 82 83 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 81 def abstract=(text) frm.frame(:id, "PostForm:shortTextBox_inputRichText___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text) end |
#add_file_to_document ⇒ Object
Clicks the Add to Document button on the File tab.
This method will fail if the File tab is not the currently selected tab.
113 114 115 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 113 def add_file_to_document frm.div(:id=>"PostForm:tab3").(:value=>"Add to document").click end |
#add_image_to_document ⇒ Object
Clicks the Add to Document button on the Image tab.
This method will fail if the image tab is not the currently selected tab.
99 100 101 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 99 def add_image_to_document frm.div(:id=>"PostForm:tab1").(:value=>"Add to document").click end |
#add_link_to_document ⇒ Object
Clicks the Add to Document button on the Link tab.
This method will fail if the Link tab is not the currently selected tab.
106 107 108 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 106 def add_link_to_document frm.div(:id=>"PostForm:tab2").(:value=>"Add to document").click end |
#add_text_to_document ⇒ Object
Clicks the Add to document button in the text tab.
92 93 94 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 92 def add_text_to_document frm.div(:id=>"PostForm:tab0").(:value=>"Add to document").click end |
#file_field(filename, filepath = "") ⇒ Object
Enters the specified directory/filename in the file field.
125 126 127 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 125 def file_field(filename, filepath="") frm().file_field(:name=>"PostForm:tab3:_id51").set(filepath + filename) end |
#image_file(filename, filepath = "") ⇒ Object
Enters the specified filename in the file field for images.
The file path can be entered as an optional second parameter.
120 121 122 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 120 def image_file(filename, filepath="") frm.file_field(:name=>"PostForm:tab1:_id29").set(filepath + filename) end |
#preview ⇒ Object
Clicks the Preview button and instantiates the PreviewBloggerPost Class.
130 131 132 133 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 130 def preview frm().(:value=>"Preview").click PreviewBloggerPost.new(@browser) end |
#save ⇒ Object
Clicks the Save button and instantiates the Blogger Class.
136 137 138 139 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 136 def save frm.(:value=>"Save").click Blogger.new(@browser) end |
#text=(text) ⇒ Object
Enters the specified string into the FCKEditor for the Text of the Blog.
86 87 88 |
# File 'lib/sakai-cle-test-api/page_objects/blogger.rb', line 86 def text=(text) frm().frame(:id, "PostForm:tab0:main_text_inputRichText___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text) end |