Sha256: 83e9ad6e51e228f7fce04093915c103b35d10adac6f292517663c20c35eaeb8b

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

module SeleniumConnect
  extend self

  def configure
    yield configuration
  end

  def configuration
    @configuration = Configuration.new
  end

  attr_reader :server, :driver

  def localhost?
    @configuration.host == 'localhost'
  end

  def run
    if localhost?
      @server = Server.new(@configuration)
      server.start
    end
    @driver = Runner.new(@configuration).driver
  end

  def finish
    driver.quit
    if localhost? then server.stop end
  end

  alias :start :run
  alias :stop :finish
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
selenium-connect-1.3.0 lib/selenium-connect/selenium-connect.rb