Class: UserAccount
- Defined in:
- lib/sakai-cle-test-api/page_objects/account.rb
Overview
A Non-Admin User’s Account page Accessible via the “Account” link in “MY SETTINGS”
IMPORTANT: this class does not use PageObject or the ToolsMenu!! So, the only available method to navigate away from this page is Home. Otherwise, you’ll have to call the navigation link Explicitly in the test case itself.
Objects and methods used in this class must be explicitly defined using Watir and Ruby code.
Do NOT use the PageObject syntax in this class.
Instance Method Summary collapse
-
#created ⇒ Object
Gets the text of the Created field.
-
#created_by ⇒ Object
Gets the text of the Created By field.
-
#email ⇒ Object
Gets the text of the Email field.
-
#first_name ⇒ Object
Gets the text of the First Name field.
-
#home ⇒ Object
Clicks the Home buton in the left menu.
-
#last_name ⇒ Object
Gets the text of the Last Name field.
-
#modified ⇒ Object
Gets the text of the Modified (date) field.
-
#modified_by ⇒ Object
Gets the text of the Modified By field.
-
#modify_details ⇒ Object
Clicks the Modify Details button.
-
#type ⇒ Object
Gets the text of the Type field.
-
#user_id ⇒ Object
Gets the text of the User ID field.
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
#created ⇒ Object
Gets the text of the Created field.
90 91 92 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 90 def created @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[1][1].text end |
#created_by ⇒ Object
Gets the text of the Created By field.
85 86 87 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 85 def created_by @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[0][1].text end |
#email ⇒ Object
Gets the text of the Email field.
75 76 77 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 75 def email @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[3][1].text end |
#first_name ⇒ Object
Gets the text of the First Name field.
65 66 67 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 65 def first_name @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[1][1].text end |
#home ⇒ Object
Clicks the Home buton in the left menu. instantiates the Home Class.
106 107 108 109 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 106 def home @browser.link(:text, "Home").click Home.new(@browser) end |
#last_name ⇒ Object
Gets the text of the Last Name field.
70 71 72 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 70 def last_name @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[2][1].text end |
#modified ⇒ Object
Gets the text of the Modified (date) field.
100 101 102 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 100 def modified @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[3][1].text end |
#modified_by ⇒ Object
Gets the text of the Modified By field.
95 96 97 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 95 def modified_by @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>1)[2][1].text end |
#modify_details ⇒ Object
Clicks the Modify Details button. Instantiates the EditAccount class.
54 55 56 57 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 54 def modify_details @browser.frame(:index=>0).(:name=>"eventSubmit_doModify").click EditAccount.new(@browser) end |
#type ⇒ Object
Gets the text of the Type field.
80 81 82 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 80 def type @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[4][1].text end |
#user_id ⇒ Object
Gets the text of the User ID field.
60 61 62 |
# File 'lib/sakai-cle-test-api/page_objects/account.rb', line 60 def user_id @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[0][1].text end |