Module: MiniAutobot

Defined in:
lib/mini_autobot/init.rb,
lib/mini_autobot/utils.rb,
lib/mini_autobot/emails.rb,
lib/mini_autobot/logger.rb,
lib/mini_autobot/runner.rb,
lib/mini_autobot/console.rb,
lib/mini_autobot/version.rb,
lib/mini_autobot/parallel.rb,
lib/mini_autobot/settings.rb,
lib/mini_autobot/connector.rb,
lib/mini_autobot/test_case.rb,
lib/mini_autobot/test_cases.rb,
lib/mini_autobot/endeca/base.rb,
lib/mini_autobot/page_objects.rb,
lib/mini_autobot/emails/mailbox.rb,
lib/mini_autobot/utils/castable.rb,
lib/mini_autobot/utils/loggable.rb,
lib/mini_autobot/page_objects/base.rb,
lib/mini_autobot/utils/endeca_helper.rb,
lib/mini_autobot/utils/assertion_helper.rb,
lib/mini_autobot/utils/page_object_helper.rb,
lib/mini_autobot/page_objects/overlay/base.rb,
lib/mini_autobot/page_objects/widgets/base.rb,
lib/mini_autobot/utils/data_generator_helper.rb,
lib/mini_autobot/utils/overlay_and_widget_helper.rb

Overview

The base module for everything MiniAutobot and is the container for other modules and classes in the hierarchy:

  • ‘Connector` provides support for drivers and connector profiles;

  • ‘Emails` introduces email-specific drivers for MiniAutobot;

  • ‘PageObjects` provides a hierarchy of page objects, page modules, widgets, and overlays;

  • ‘Settings` provides support for internal MiniAutobot settings; and

  • ‘Utils` provides an overarching module for miscellaneous helper modules.

Defined Under Namespace

Modules: Emails, Endeca, PageObjects, TestCases, Utils Classes: Connector, Console, Logger, Parallel, Runner, Settings, TestCase

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.gem_rootObject

Absolute path of root directory of this gem can be used both within this gem and in automation repo



45
46
47
# File 'lib/mini_autobot/init.rb', line 45

def self.gem_root
  @@__gem_root__ ||= Pathname.new(File.realpath(File.join(File.dirname(__FILE__), '..', '..')))
end

.loggerObject



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

def self.logger
  @@logger ||= MiniAutobot::Logger.new($stdout)
end

.logger=(value) ⇒ Object



16
17
18
# File 'lib/mini_autobot/init.rb', line 16

def self.logger=(value)
  @@logger = value
end

.rootPathname

Root directory of the automation repository. Automation repo can use it to refer to files within itself, and this gem also uses it to refer to config files of automation, for example:

File.read(MiniAutobot.root.join('config/mini_autobot', 'data.yml'))

will return the contents of ‘automation_root/config/mini_autobot/data.yml`.

Returns:

  • (Pathname)

    A reference to the root directory, ready to be used in directory and file path calculations.



39
40
41
# File 'lib/mini_autobot/init.rb', line 39

def self.root
  @@__root__ ||= Pathname.new(File.expand_path('.'))
end

.settingsObject



20
21
22
# File 'lib/mini_autobot/init.rb', line 20

def self.settings
  @@settings ||= Settings.new
end

.settings=(options) ⇒ Object



24
25
26
# File 'lib/mini_autobot/init.rb', line 24

def self.settings=(options)
  self.settings.merge!(options)
end