Class: AddEditAnnouncements

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

Overview

The page where an announcement is created or edited.

Instance Method Summary collapse

Methods included from FCKEditor

#enter_source_text, #entity_picker, #get_source_text, #select_all, #source, #source_field

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

#body=(text) ⇒ Object

Sends the specified text block to the rich text editor

Parameters:

  • text (String)

    the text that you want to add to the editor.



132
133
134
# File 'lib/sakai-cle-test-api/page_objects/announcements.rb', line 132

def body=(text)
  editor.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#check_group(group_name) ⇒ Object

Clicks the checkbox for the specified group name when you’ve set the announcement access to display to groups.

Parameters:

  • group_name (String)

    the name of the group in the table that you intend to select.



143
144
145
# File 'lib/sakai-cle-test-api/page_objects/announcements.rb', line 143

def check_group(group_name)
  frm.table(:id=>"groupTable").row(:text=>/#{Regexp.escape(group_name)}/).checkbox(:name=>"selectedGroups").set
end