Class: AwsAccountUtils::AlternateContacts
- Defined in:
- lib/aws_account_utils/alternate_contacts.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) ⇒ AlternateContacts
constructor
A new instance of AlternateContacts.
- #set(account_email, account_password, contact_info = {}) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(logger, browser) ⇒ AlternateContacts
Returns a new instance of AlternateContacts.
8 9 10 11 |
# File 'lib/aws_account_utils/alternate_contacts.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/alternate_contacts.rb', line 6 def browser @browser end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/aws_account_utils/alternate_contacts.rb', line 6 def logger @logger end |
Instance Method Details
#set(account_email, account_password, contact_info = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/aws_account_utils/alternate_contacts.rb', line 13 def set(account_email, account_password, contact_info = {}) logger.debug "Setting alternate account contacts." Login.new(logger, browser).execute url, account_email, account_password browser.a(:xpath => '//a[@ng-click="toggleEditingAlternateContactsInfoState()"]').when_present.click form_inputs(contact_info) screenshot(browser, "1") browser.(:xpath => '//button[@ng-click="updateAlternateContacts()"]').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 |