Class: Profile2View

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

#connections, #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

#basic_informationObject



281
282
283
284
285
286
287
288
289
290
291
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 281

def basic_information
  hash = {}
  begin
    frm.div(:class=>"mainSection", :text=>/Basic Information/).table(:class=>"profileContent").rows.each do |row|
      hash.store(row[0].text, row[1].text)
    end
  rescue Watir::Exception::UnknownObjectException

  end
  return hash
end

#connectionObject



276
277
278
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 276

def connection
  frm.div(:class=>"leftPanel").span(:class=>/instruction icon/).text
end

#contact_informationObject



294
295
296
297
298
299
300
301
302
303
304
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 294

def contact_information
  hash = {}
  begin
    frm.div(:class=>"mainSection", :text=>/Contact Information/).table(:class=>"profileContent").rows.each do |row|
      hash.store(row[0].text, row[1].text)
    end
  rescue Watir::Exception::UnknownObjectException

  end
  return hash
end

#personal_informationObject



333
334
335
336
337
338
339
340
341
342
343
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 333

def personal_information
  hash = {}
  begin
    frm.div(:class=>"mainSection", :text=>/Personal Information/).table(:class=>"profileContent").rows.each do |row|
      hash.store(row[0].text, row[1].text)
    end
  rescue Watir::Exception::UnknownObjectException

  end
  return hash
end

#staff_informationObject



307
308
309
310
311
312
313
314
315
316
317
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 307

def staff_information
  hash = {}
  begin
    frm.div(:class=>"mainSection", :text=>/Staff Information/).table(:class=>"profileContent").rows.each do |row|
      hash.store(row[0].text, row[1].text)
    end
  rescue Watir::Exception::UnknownObjectException

  end
  return hash
end

#student_informationObject



320
321
322
323
324
325
326
327
328
329
330
# File 'lib/sakai-cle-test-api/page_objects/profile2.rb', line 320

def student_information
  hash = {}
  begin
    frm.div(:class=>"mainSection", :text=>/Student Information/).table(:class=>"profileContent").rows.each do |row|
      hash.store(row[0].text, row[1].text)
    end
  rescue Watir::Exception::UnknownObjectException

  end
  return hash
end