Class: ReplyToMessage

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

Instance Method Summary collapse

Methods included from FCKEditor

#enter_source_text, #get_source_text, #select_all, #source

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

#add_attachmentsObject



508
509
510
511
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 508

def add_attachments
  frm.button(:value=>"Add attachments").click
  MessagesAttachment.new(@browser)
end

#message_text=(text) ⇒ Object



503
504
505
506
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 503

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

#previewObject



513
514
515
516
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 513

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

#sendObject



492
493
494
495
496
497
498
499
500
501
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 492

def send
  frm.button(:value=>"Send ").click
  # Need logic here to ensure the
  # right class gets called...
  if frm.div(:class=>/breadCrumb/).text=~ /Messages.\/.Received/
    MessagesReceivedList.new(@browser)
  else #FIXME
    Messages.new(@browser)
  end
end