Class: Profile2Connections

Inherits:
Profile2Base show all
Defined in:
lib/sambal-cle/page_objects/profile2.rb

Instance Method Summary collapse

Methods inherited from Profile2Base

profile2_elements

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#confirm_request(name) ⇒ Object



191
192
193
194
195
196
# File 'lib/sambal-cle/page_objects/profile2.rb', line 191

def confirm_request(name)
  frm.div(:class=>"connection", :text=>name).link(:title=>"Confirm connection request").click
  frm.div(:class=>"modalWindowButtons").wait_until_present
  frm.div(:class=>"modalWindowButtons").button(:value=>"Confirm connection request").click
  frm.div(:class=>"modalWindowButtons").wait_while_present
end

#connectionsObject

Returns an array containing the names of the connected users.



199
200
201
202
203
204
205
206
207
# File 'lib/sambal-cle/page_objects/profile2.rb', line 199

def connections
  results = []
  frm.div(:class=>"portletBody").spans.each do |span|
    if span.class_name == "connection-info-name"
      results << span.text
    end
  end
  return results
end