Sha256: 871e7d566155b4f77f0bb7b4e9d06e22a2a58dda93609958bece7b12cc2ee94d

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require_relative "../integration"
require_relative "configuration/settings"
require_relative "patcher"

module Datadog
  module CI
    module Contrib
      module Selenium
        # Description of Selenium integration
        class Integration < Contrib::Integration
          MINIMUM_VERSION = Gem::Version.new("4.0.0")

          def version
            Gem.loaded_specs["selenium-webdriver"]&.version
          end

          def loaded?
            !defined?(::Selenium).nil? && !defined?(::Selenium::WebDriver).nil? &&
              !defined?(::Selenium::WebDriver::Driver).nil?
          end

          def compatible?
            super && version >= MINIMUM_VERSION
          end

          # additional instrumentations for test libraries are late instrumented on test session start
          def late_instrument?
            true
          end

          def new_configuration
            Configuration::Settings.new
          end

          def patcher
            Patcher
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datadog-ci-1.12.0 lib/datadog/ci/contrib/selenium/integration.rb
datadog-ci-1.11.0 lib/datadog/ci/contrib/selenium/integration.rb
datadog-ci-1.10.0 lib/datadog/ci/contrib/selenium/integration.rb
datadog-ci-1.9.0 lib/datadog/ci/contrib/selenium/integration.rb