Class: UserAccount

Inherits:
BasePage
  • Object
show all
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

Methods inherited from BasePage

basic_page_elements, frame_element

Instance Method Details

#createdObject

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_byObject

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

#emailObject

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_nameObject

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

#homeObject

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_nameObject

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

#modifiedObject

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_byObject

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_detailsObject

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).button(:name=>"eventSubmit_doModify").click
end

#typeObject

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_idObject

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