Class: UserMembership
- Defined in:
- lib/sakai-cle-test-api/page_objects/user_membership.rb
Overview
User Membership page for admin users - “icon-sakai-usermembership”
Instance Method Summary collapse
-
#alert_text ⇒ Object
Returns the text contents of the “instruction” paragraph that appears when there are no search results.
-
#names ⇒ Object
Returns an array containing the user names displayed in the search results.
-
#type(name) ⇒ Object
Returns the user type of the specified user (assuming that person appears in the search results list, otherwise this method will throw an error.).
-
#user_id(name) ⇒ Object
Returns the user id of the specified user (assuming that person appears in the search results list, otherwise this method will throw an error.).
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
#alert_text ⇒ Object
Returns the text contents of the “instruction” paragraph that appears when there are no search results.
36 37 38 |
# File 'lib/sakai-cle-test-api/page_objects/user_membership.rb', line 36 def alert_text frm.p(:class=>"instruction").text end |
#names ⇒ Object
Returns an array containing the user names displayed in the search results.
11 12 13 14 15 16 17 18 |
# File 'lib/sakai-cle-test-api/page_objects/user_membership.rb', line 11 def names names = [] frm.table(:class=>/listHier/).rows.each do |row| names << row[2].text end names.delete_at(0) return names end |
#type(name) ⇒ Object
Returns the user type of the specified user (assuming that person appears in the search results list, otherwise this method will throw an error.)
30 31 32 |
# File 'lib/sakai-cle-test-api/page_objects/user_membership.rb', line 30 def type(name) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(name)}/)[4].text end |
#user_id(name) ⇒ Object
Returns the user id of the specified user (assuming that person appears in the search results list, otherwise this method will throw an error.)
23 24 25 |
# File 'lib/sakai-cle-test-api/page_objects/user_membership.rb', line 23 def user_id(name) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(name)}/)[0].text end |