Class: ComposeMessage

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

Instance Method Summary collapse

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



467
468
469
470
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 467

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

#message_text=(text) ⇒ Object



461
462
463
464
465
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 461

def message_text=(text)
  frm.frame(:id, "compose:pvt_message_body_inputRichText___Frame").td(:id, "xEditingArea").wait_until_present
  sleep 0.3
  frm.frame(:id, "compose:pvt_message_body_inputRichText___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#previewObject



472
473
474
475
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 472

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

#sendObject



456
457
458
459
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 456

def send
  frm.button(:value=>"Send ").click
  Messages.new(@browser)
end