Class: UserAccount
- Defined in:
- lib/sambal-cle/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
Instance Method Details
#created ⇒ Object
Gets the text of the Created field.
89 90 91 |
# File 'lib/sambal-cle/page_objects/account.rb', line 89 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.
84 85 86 |
# File 'lib/sambal-cle/page_objects/account.rb', line 84 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.
74 75 76 |
# File 'lib/sambal-cle/page_objects/account.rb', line 74 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.
64 65 66 |
# File 'lib/sambal-cle/page_objects/account.rb', line 64 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.
105 106 107 |
# File 'lib/sambal-cle/page_objects/account.rb', line 105 def home @browser.link(:text, "Home").click end |
#last_name ⇒ Object
Gets the text of the Last Name field.
69 70 71 |
# File 'lib/sambal-cle/page_objects/account.rb', line 69 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.
99 100 101 |
# File 'lib/sambal-cle/page_objects/account.rb', line 99 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.
94 95 96 |
# File 'lib/sambal-cle/page_objects/account.rb', line 94 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 |
# File 'lib/sambal-cle/page_objects/account.rb', line 54 def modify_details @browser.frame(:index=>0).(:name=>"eventSubmit_doModify").click end |
#type ⇒ Object
Gets the text of the Type field.
79 80 81 |
# File 'lib/sambal-cle/page_objects/account.rb', line 79 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.
59 60 61 |
# File 'lib/sambal-cle/page_objects/account.rb', line 59 def user_id @browser.frame(:index=>0).table(:class=>"itemSummary", :index=>0)[0][1].text end |