Module: Marta

Includes:
Json2Class, OptionsAndPaths, ReadWrite
Defined in:
lib/marta.rb,
lib/marta/object.rb,
lib/marta/server.rb,
lib/marta/x_path.rb,
lib/marta/dialogs.rb,
lib/marta/version.rb,
lib/marta/injector.rb,
lib/marta/lightning.rb,
lib/marta/read_write.rb,
lib/marta/black_magic.rb,
lib/marta/json_2_class.rb,
lib/marta/public_methods.rb,
lib/marta/page_arithmetic.rb,
lib/marta/classes_creation.rb,
lib/marta/options_and_paths.rb,
lib/marta/element_information.rb,
lib/marta/user_values_prework.rb,
lib/marta/simple_element_finder.rb

Overview

Marta class is providing three simple methods.

const_missing is hijacked. And in a learn mode marta will treat any unknown constant as an unknown pageobject and will try to ask about using browser

Defined Under Namespace

Modules: BlackMagic, ClassesCreation, Dialogs, ElementInformation, Injector, Json2Class, Lightning, OptionsAndPaths, PageArithmetic, PublicMethods, ReadWrite, Server, SimpleElementFinder, UserValuePrework, XPath Classes: SmartPage

Constant Summary collapse

VERSION =
"0.41245"
NAME =
"marta"

Instance Method Summary collapse

Instance Method Details

#dance_with(browser: nil, folder: nil, learn: nil, tolerancy: nil, base_url: nil, cold_timeout: nil, port: nil, clear: nil) ⇒ Object

dance_with is for creating settings to be used later. Settings can be changed at any time by calling dance with. Read more in the README



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/marta.rb', line 59

def dance_with(browser: nil, folder: nil, learn: nil, tolerancy: nil,
               base_url: nil, cold_timeout: nil, port: nil, clear: nil)
  SettingMaster.clear if clear
  SettingMaster.set_port port
  # We are always turning the server on in order to show Welcome!
  SettingMaster.set_server # server should be before browser
  SettingMaster.set_engine browser # browser should be before learn!
  SettingMaster.set_learn learn
  SettingMaster.set_folder folder
  SettingMaster.set_base_url base_url
  read_folder
  SettingMaster.set_tolerancy tolerancy
  SettingMaster.set_cold_timeout cold_timeout
  engine
end

#engineObject

Marta is returning an engine (it should be a browser instance) Watir::Browser.new(:chrome) by default



52
53
54
# File 'lib/marta.rb', line 52

def engine
  SettingMaster.engine
end