Module: FCKEditor

Instance Method Summary collapse

Instance Method Details

#enter_source_text(editor, text) ⇒ Object



15
16
17
18
19
# File 'lib/sakai-cle-test-api/rich_text.rb', line 15

def enter_source_text(editor, text)
  source(editor)
  editor.text_field(:class=>"SourceField").wait_until_present
  editor.text_field(:class=>"SourceField").set text
end

#get_source_text(editor) ⇒ Object



21
22
23
24
25
# File 'lib/sakai-cle-test-api/rich_text.rb', line 21

def get_source_text(editor)
  source(editor)
  editor.text_field(:class=>"SourceField").wait_until_present
  editor.text_field(:class=>"SourceField").value
end

#select_all(editor) ⇒ Object



10
11
12
13
# File 'lib/sakai-cle-test-api/rich_text.rb', line 10

def select_all(editor)
  editor.div(:title=>"Select All").wait_until_present
  editor.div(:title=>"Select All").click
end

#source(editor) ⇒ Object

This has to be defined this way because there several pages that have multiple rich text editors.



5
6
7
8
# File 'lib/sakai-cle-test-api/rich_text.rb', line 5

def source(editor)
  editor.div(:title=>/Source/).wait_until_present
  editor.div(:title=>/Source/).click
end