Class: Users
- Defined in:
- lib/sakai-cle-test-api/page_objects/users.rb
Overview
The Users page - “icon-sakai-users”
Instance Method Summary collapse
-
#email(user_id) ⇒ Object
Returns the contents of the Email cell based on the specified user ID value.
-
#name(user_id) ⇒ Object
Returns the contents of the Name cell based on the specified user ID value.
- #new_user ⇒ Object
- #search_button ⇒ Object
-
#type(user_id) ⇒ Object
Returns the contents of the Type cell based on the specified user ID value.
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
#email(user_id) ⇒ Object
Returns the contents of the Email cell based on the specified user ID value.
43 44 45 |
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 43 def email(user_id) frm.table(:class=>"listHier lines").row(:text=>/#{Regexp.escape(user_id)}/i)[2].text end |
#name(user_id) ⇒ Object
Returns the contents of the Name cell based on the specified user ID value.
37 38 39 |
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 37 def name(user_id) frm.table(:class=>"listHier lines").row(:text=>/#{Regexp.escape(user_id)}/i)[1].text end |
#new_user ⇒ Object
30 31 32 33 |
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 30 def new_user frm.link(:text=>"New User").click CreateNewUser.new @browser end |
#search_button ⇒ Object
53 54 55 56 57 |
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 53 def frm.link(:text=>"Search").click frm.table(:class=>"listHier lines").wait_until_present Users.new @browser end |
#type(user_id) ⇒ Object
Returns the contents of the Type cell based on the specified user ID value.
49 50 51 |
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 49 def type(user_id) frm.table(:class=>"listHier lines").row(:text=>/#{Regexp.escape(user_id)}/i)[3].text end |