Class: EditAccount
- Defined in:
- lib/sakai-cle-test-api/page_objects/account.rb
Overview
The Page for editing User Account details
Instance Method Summary collapse
-
#update_details ⇒ Object
Clicks the update details button then makes sure there isn’t any error message present.
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
#update_details ⇒ Object
Clicks the update details button then makes sure there isn’t any error message present. If there is, it reinstantiates the Edit Account Class, otherwise it instantiates the UserAccount Class.
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 14 def update_details frm.(:value=>"Update Details").click # Need to check if the update took... if frm.div(:class=>"portletBody").h3.text=="My Account Details" # Apparently it did... UserAccount.new(@browser) elsif frm.div(:class=>"portletBody").h3.text=="Account Details" # We are on the edit page (or we're using the Admin account)... EditAccount.new(@browser) elsif frm.div(:class=>"portletBody").h3.text=="Users" Users.new(@browser) end end |