Class: Users

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/users.rb

Overview

The Users page - “icon-sakai-users”

Instance Method Summary collapse

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_userObject



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_buttonObject



53
54
55
56
57
# File 'lib/sakai-cle-test-api/page_objects/users.rb', line 53

def search_button
  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