Class: Profile2Connections

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

Instance Method Summary collapse

Methods included from Profile2Nav

#messages, #my_profile, #pictures, #preferences, #privacy, #search_for_connections

Methods inherited from BasePage

basic_page_elements, frame_element

Instance Method Details

#confirm_request(name) ⇒ Object



249
250
251
252
253
254
255
256
# File 'lib/sambal-cle/page_objects/profile2.rb', line 249

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
  sleep 0.5
  Profile2Connections.new @browser
end

#connectionsObject

Returns an array containing the names of the connected users.



259
260
261
262
263
264
265
266
267
# File 'lib/sambal-cle/page_objects/profile2.rb', line 259

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