Sha256: 56a90f12ab6c807ede1049e6a1471c0cad864d9e5287811577d5bb9d92735053

Contents?: true

Size: 960 Bytes

Versions: 9

Compression:

Stored size: 960 Bytes

Contents

module Fluent
  module Platforms
    
    @drivers = {}
    
    def self.register(driver, platform)
      @drivers[driver] = platform
    end
    
    def self.list
      @drivers
    end
    
    # This module determines what execution platform Fluent will use. The
    # decision is based on the browser that has been established for the
    # execution profile.
    #
    # @param driver [Object] the browser to establish the platform for
    # @return [Object] a platform object to execute tests against
    def get_platform_for(driver)
      Fluent::Platforms.list.each_value do |drv|
        return drv.create_platform_object_for(driver) if drv.works_with?(driver)
      end
      msg = "Unable to create a platform object for #{driver}."
      raise Fluent::Errors::UnableToCreatePlatform, msg
    end
    
  end
end

require 'fluent/platform_watir'
require 'fluent/platform_selenium'
require 'fluent/platform_mechanize'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fluent-0.7.5 lib/fluent/platforms.rb
fluent-0.7.4 lib/fluent/platforms.rb
fluent-0.7.3 lib/fluent/platforms.rb
fluent-0.7.2 lib/fluent/platforms.rb
fluent-0.7.1 lib/fluent/platforms.rb
fluent-0.7.0 lib/fluent/platforms.rb
fluent-0.6.0 lib/fluent/platforms.rb
fluent-0.5.0 lib/fluent/platforms.rb
fluent-0.4.0 lib/fluent/platforms.rb