Module: AddEditEventMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/calendar.rb
Instance Method Summary collapse
- #add_attachments ⇒ Object
- #add_remove_attachments ⇒ Object
-
#attachment?(file_name) ⇒ Boolean
Returns true if the page has a link with the specified file name.
-
#custom_field_text(field, text) ⇒ Object
Use this method to enter text into custom fields on the page.
- #frequency ⇒ Object
- #message=(text) ⇒ Object
-
#message_editor ⇒ Object
The FCKEditor object.
- #save_event ⇒ Object
Instance Method Details
#add_attachments ⇒ Object
277 278 279 280 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 277 def frm.(:value=>"Add Attachments").click EventAttach.new(@browser) end |
#add_remove_attachments ⇒ Object
282 283 284 285 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 282 def frm.(:value=>"Add/remove attachments").click EventAttach.new(@browser) end |
#attachment?(file_name) ⇒ Boolean
Returns true if the page has a link with the specified file name. Use for test case asserts.
289 290 291 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 289 def (file_name) frm.link(:text=>file_name).exist? end |
#custom_field_text(field, text) ⇒ Object
Use this method to enter text into custom fields on the page. The “field” variable is the name of the field, while the “text” is the string you want to put into it.
297 298 299 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 297 def custom_field_text(field, text) frm.text_field(:name=>field).set(text) end |
#frequency ⇒ Object
272 273 274 275 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 272 def frequency frm.(:name=>"eventSubmit_doEditfrequency").click EventFrequency.new(@browser) end |
#message=(text) ⇒ Object
262 263 264 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 262 def (text) frm.frame(:id, "description___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text) end |
#message_editor ⇒ Object
The FCKEditor object. Use this method to set up a “wait_until_present” step, since sometimes it takes a long time for this object to load.
268 269 270 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 268 def frm.frame(:id, "description___Frame").td(:id, "xEditingArea").frame(:index=>0) end |
#save_event ⇒ Object
257 258 259 260 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 257 def save_event frm.(:value=>"Save Event").click Calendar.new(@browser) end |