Class: MyProfileOnline
- Inherits:
-
Object
- Object
- MyProfileOnline
- Includes:
- GlobalMethods, HeaderFooterBar, LeftMenuBarYou, PageObject
- Defined in:
- lib/sakai-oae-test-api/page_classes.rb
Overview
Methods related to the ‘Online’ page in My Profile.
Instance Method Summary collapse
-
#remove_this_online(text) ⇒ Object
Removes the specified Online record from the list by clicking its “Remove this Online” button.
-
#sites_list ⇒ Object
Returns a hash object, where the keys are the site names and the values are the urls.
-
#update ⇒ Object
Clicks the “Update” button and waits for any Ajax calls to complete.
Methods included from LeftMenuBarYou
#change_picture, #inbox, #invitations, #my_contacts_count, #my_library_count, #my_messages_lock_icon, #sent, #show_hide_my_messages_tree, #trash, #unread_inbox_count, #unread_invitations_count, #unread_message_count
Methods included from PageObject
#method_missing, #name_li, #name_link
Methods included from HeaderFooterBar
#acknowledgements, #add_collection, #add_content, #browse_footer, #browse_footer_link, #change_language, #change_location, #click_link, #explore_footer, #explore_footer_link, #login, #messages_container, #my_account, #sign_out, #sign_up, #toggle_collector, #user_agreement
Methods included from GlobalMethods
#close_notification, #menu_item, #open_page, #view_person
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageObject
Instance Method Details
#remove_this_online(text) ⇒ Object
Removes the specified Online record from the list by clicking its “Remove this Online” button.
1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1014 def remove_this_online(text) #find the div... div = self.div(:class=>"online").text_field(:value=>text).parent.parent.parent #click the button div.(:id=>/displayprofilesection_remove_link_/).click self.wait_for_ajax end |
#sites_list ⇒ Object
Returns a hash object, where the keys are the site names and the values are the urls.
1004 1005 1006 1007 1008 1009 1010 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1004 def sites_list hash = {} self.div(:id=>"displayprofilesection_sections_online").divs(:class=>"s3d-form-field-wrapper").each do |div| hash.store(div.text_field(:id=>/siteOnline_/).value, div.text_field(:id=>/urlOnline_/).value) end return hash end |
#update ⇒ Object
Clicks the “Update” button and waits for any Ajax calls to complete.
997 998 999 1000 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 997 def update self.form(:id=>"displayprofilesection_form_online").(:text=>"Update").click self.wait_for_ajax end |