Module: AutomationHelpers

Defined in:
lib/automation_helpers.rb,
lib/automation_helpers/logger.rb,
lib/automation_helpers/version.rb,
lib/automation_helpers/patches/base.rb,
lib/automation_helpers/drivers/local.rb,
lib/automation_helpers/drivers/remote.rb,
lib/automation_helpers/drivers/v4/local.rb,
lib/automation_helpers/patches/capybara.rb,
lib/automation_helpers/drivers/v4/remote.rb,
lib/automation_helpers/drivers/v4/options.rb,
lib/automation_helpers/drivers/browserstack.rb,
lib/automation_helpers/drivers/v4/browserstack.rb,
lib/automation_helpers/drivers/v4/capabilities.rb,
lib/automation_helpers/patches/selenium_logger.rb

Overview

AutomationHelpers namespace

Defined Under Namespace

Modules: Drivers, Patches Classes: Logger

Constant Summary collapse

VERSION =
'5.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.chrome_log_pathObject

Returns the value of attribute chrome_log_path.



12
13
14
# File 'lib/automation_helpers.rb', line 12

def chrome_log_path
  @chrome_log_path
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



14
15
16
# File 'lib/automation_helpers.rb', line 14

def configure
  yield self
end

.log_path=(logdev) ⇒ Object

This writer method allows you to configure where you want the output of the automation_helpers logs to go (Default is $stdout)

example: AutomationHelpers.log_path = ‘automation_helpers.log’ would save all log messages to ‘./automation_helpers.log`



38
39
40
# File 'lib/automation_helpers.rb', line 38

def log_path=(logdev)
  logger.reopen(logdev)
end

.loggerObject

The Automation Helpers logger object - This is called automatically in several locations and will log messages according to the normal Ruby protocol

This logger object can also be used to manually log messages

To Manually log a message

AutomationHelpers.logger.info('Information')
AutomationHelpers.logger.debug('Input debug message')

By default the logger will output all messages to $stdout, but can be altered to log to a file or another IO location by calling ‘.log_path=`



29
30
31
# File 'lib/automation_helpers.rb', line 29

def logger
  @logger ||= Logger.create
end