Class: AwsAccountUtils::CompanyName
- Defined in:
- lib/aws_account_utils/company_name.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(logger, browser) ⇒ CompanyName
constructor
A new instance of CompanyName.
- #set(account_email, account_password, company_name) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(logger, browser) ⇒ CompanyName
Returns a new instance of CompanyName.
8 9 10 11 |
# File 'lib/aws_account_utils/company_name.rb', line 8 def initialize(logger, browser) @logger = logger @browser = browser end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
6 7 8 |
# File 'lib/aws_account_utils/company_name.rb', line 6 def browser @browser end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/aws_account_utils/company_name.rb', line 6 def logger @logger end |
Instance Method Details
#set(account_email, account_password, company_name) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/aws_account_utils/company_name.rb', line 13 def set(account_email, account_password, company_name) logger.debug "Updating Company Name details." Login.new(logger, browser).execute url, account_email, account_password browser.a(:xpath => '//a[@ng-click="toggleEditingContactInfoState()"]').when_present.click browser.input(:xpath => '//input[@ng-model="address.company"]').to_subtype.set(company_name) # screenshot(browser, "1") browser.(:xpath => '//button[@ng-click="updateContactInformation()"]').when_present.click browser.div(:xpath => '//div[@ng-show="options.status == \'success\'"]').wait_until_present true rescue Watir::Wait::TimeoutError, Net::ReadTimeout => e screenshot(browser, "error") raise StandardError, "#{self.class.name} - #{e}" end |