Class: MessagesSentList

Inherits:
BasePage
  • Object
show all
Defined in:
lib/sambal-cle/page_objects/messages.rb

Instance Method Summary collapse

Methods inherited from BasePage

basic_page_elements, frame_element

Instance Method Details

#alert_message_textObject

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/sambal-cle/page_objects/messages.rb', line 122

def alert_message_text
  frm.span(:class=>"success").text
end

#compose_messageObject

Clicks the Compose Message button, then instantiates the ComposeMessage class.



111
112
113
114
# File 'lib/sambal-cle/page_objects/messages.rb', line 111

def compose_message
  frm.link(:text=>"Compose Message").click
  ComposeMessage.new(@browser)
end

#headerObject

Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.



104
105
106
# File 'lib/sambal-cle/page_objects/messages.rb', line 104

def header
  frm.div(:class=>"breadCrumb specialLink").text
end

#messagesObject

Clicks the “Messages” breadcrumb link to return to the top level of Messages. Then instantiates the Messages class.



86
87
88
89
# File 'lib/sambal-cle/page_objects/messages.rb', line 86

def messages
  frm.link(:text=>"Messages").click
  Messages.new(@browser)
end

#subjectsObject

Creates an array consisting of the message subject lines.



93
94
95
96
97
98
99
100
# File 'lib/sambal-cle/page_objects/messages.rb', line 93

def subjects
  titles = []
  messages = frm.table(:id=>"prefs_pvt_form:pvtmsgs")
  1.upto(messages.rows.size-1) do |x|
    titles << messages.row(:index=>x).a.title
  end
  return titles
end