Class: AddEditSyllabusItem

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

Instance Method Summary collapse

Methods included from FCKEditor

#enter_source_text, #get_source_text, #select_all, #source

Methods inherited from SyllabusBase

menu_elements

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

#content=(text) ⇒ Object

Sends the specified string to the FCKEditor text area on the page.



101
102
103
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 101

def content=(text)
  editor.send_keys(text)
end

#editorObject

Defines the text area of the FCKEditor that appears on the page for the Syllabus content.



96
97
98
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 96

def editor
  frm.frame(:id=>/_textarea___Frame/)
end

#files_listObject

Returns an array of the filenames in the attachments table



111
112
113
114
115
116
117
118
119
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 111

def files_list
  names = []
  frm.table(:class=>"listHier lines nolines").rows.each do |row|
    if row.td(:class=>"item").exist?
      names << row.td(:class=>"item").h4.text
    end
  end
  return names
end

#previewObject

Clicks the preview button and instantiates the SyllabusPreview class



123
124
125
126
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 123

def preview
  frm.button(:value=>"Preview").click
  SyllabusPreview.new(@browser)
end