13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/aws_account_utils/account.rb', line 13
def close(account_email, account_password)
logger.debug "Closing AWS account."
Login.new(logger, browser).execute url,
account_email,
account_password
browser.checkbox(:ng_model =>'isClosingAccount').when_present.set
screenshot(browser, "3")
browser.button(:text => /Close Account/).when_present.click
screenshot(browser, "2")
browser.wait_until{ browser.text.include? 'Are you sure you want to close your account?'}
browser.span(:text => /Close Account/).when_present.click
screenshot(browser, "3")
browser.p(:text => /Are you sure you want to close your account?/).wait_while_present
browser.wait_until{ browser.text.include? 'Account has been closed'}
rescue Watir::Wait::TimeoutError, Net::ReadTimeout => e
screenshot(browser, "error")
raise StandardError, "#{self.class.name} - #{e}"
end
|