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

Version Path
ruby_raider-1.1.1 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.1.0 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.9 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.8 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.7 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.6 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.5 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.4 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.3 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.2 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.1 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-1.0.0 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.9 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.8 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.7 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.6 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.5 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.4 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.3 lib/generators/templates/helpers/browser_helper.tt
ruby_raider-0.9.2 lib/generators/templates/helpers/browser_helper.tt