Sha256: 258783c8058bb76882bbfcf75a0a954e6e2521fe946d23fc164924f5b9dd7fe0

Contents?: true

Size: 829 Bytes

Versions: 2

Compression:

Stored size: 829 Bytes

Contents

module Symbiont
  module Platforms

    require 'watir-webdriver'
    require 'selenium-webdriver'

    # This module determines what execution platform Symbiont will use.
    # The decision is based on the browser that has been established for
    # the execution profile
    def get_platform_for(browser)
      if browser.is_a?(Watir::Browser)
        return @platform = Symbiont::Platforms::WatirWebDriver::PlatformObject.new(@browser)
      elsif browser.is_a?(Selenium::WebDriver::Driver)
        return @platform = Symbiont::Platforms::SeleniumWebDriver::PlatformObject.new(@browser)
      else
        raise "Unable to create a platform object for #{browser}"
      end
    end

  end # module: Platforms
end # module: Symbiont

require_relative 'platform_watir'
require_relative 'platform_selenium'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
symbiont-0.0.2 lib/symbiont/platforms.rb
symbiont-0.0.1 lib/symbiont/platforms.rb