Class: MessagesSentList
- Defined in:
- lib/sakai-cle-test-api/page_objects/messages.rb
Instance Method Summary collapse
-
#alert_message_text ⇒ Object
Grabs the text from the message box that appears after doing some action.
-
#compose_message ⇒ Object
Clicks the Compose Message button, then instantiates the ComposeMessage class.
-
#header ⇒ Object
Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.
-
#messages ⇒ Object
Clicks the “Messages” breadcrumb link to return to the top level of Messages.
-
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
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
#alert_message_text ⇒ Object
Grabs the text from the message box that appears after doing some action.
Use this method to simplify writing Test::Unit asserts
122 123 124 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 122 def frm.span(:class=>"success").text end |
#compose_message ⇒ Object
Clicks the Compose Message button, then instantiates the ComposeMessage class.
111 112 113 114 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 111 def frm.link(:text=>"Compose Message").click ComposeMessage.new(@browser) end |
#header ⇒ Object
Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.
104 105 106 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 104 def header frm.div(:class=>"breadCrumb specialLink").text end |
#messages ⇒ Object
Clicks the “Messages” breadcrumb link to return to the top level of Messages. Then instantiates the Messages class.
86 87 88 89 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 86 def frm.link(:text=>"Messages").click Messages.new(@browser) end |
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
93 94 95 96 97 98 99 100 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 93 def subjects titles = [] = frm.table(:id=>"prefs_pvt_form:pvtmsgs") 1.upto(.rows.size-1) do |x| titles << .row(:index=>x).a.title end return titles end |