Sha256: 4b85f8f2fddc657abf244a099c4139faf3e8e99dfd34242623397a21f8541813

Contents?: true

Size: 715 Bytes

Versions: 2

Compression:

Stored size: 715 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib'))
require 'watirgrid'
require 'rspec/expectations';

ENV["GRID"] = 'true'
ENV["controller_uri"] = "druby://10.0.1.3:11235"

if ENV["GRID"] then
  params = {}
  params[:controller_uri]   = ENV["controller_uri"]
  params[:browser]          = 'chrome' # type of webdriver browser to spawn
  grid ||= Watir::Grid.new(params)
  grid.start(:initiate => true, :quantity => 1, :take_all => true)
else
  @browser ||= Watir::Browser.new :chrome
end

Before do |scenario|
  @browser = grid.providers.first
end

at_exit do
  grid.iterate do |browser|
    browser.close
  end
  grid.release_tuples
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watirgrid-1.1.3 examples/parallel/cucumber/support/env.rb
watirgrid-1.1.3.pre examples/parallel/cucumber/support/env.rb