Sha256: 80859cf38628ed2620dcd5440e575cfb5f4ad9ac48219c539dc000dc82ec56d0
Contents?: true
Size: 419 Bytes
Versions: 27
Compression:
Stored size: 419 Bytes
Contents
# frozen_string_literal: true require 'yaml' require 'watir' module BrowserHelper def browser(*args) @browser ||= create_browser(*args) end private def config @config ||= YAML.load_file('config/config.yml') end def create_browser(*args) args = args.empty? ? config['browser_arguments'][config['browser']] : args Watir::Browser.new(config['browser'], options: { args: args }) end end
Version data entries
27 entries across 27 versions & 1 rubygems