Class: Profile2Connections

Inherits:
BasePage show all
Includes:
Profile2Nav
Defined in:
lib/sakai-cle-test-api/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

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

#confirm_request(name) ⇒ Object



249
250
251
252
253
254
255
256
# File 'lib/sakai-cle-test-api/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/sakai-cle-test-api/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