Class: AwsAccountUtils::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_account_utils/base.rb

Instance Method Summary collapse

Instance Method Details

#screenshot(browser, file) ⇒ Object



4
5
6
7
8
9
# File 'lib/aws_account_utils/base.rb', line 4

def screenshot(browser, file)
  return unless Settings.screenshot_dir
  calling_method = /(?<=`)(.*)(?=')/.match(caller.first).to_s.gsub(" ",'-')
  calling_class = self.class.to_s.gsub("::",'_')
  browser.screenshot.save screenshot_file(file, calling_class, calling_method)
end