Module: Datadog::CI::Contrib::Selenium::Patcher

Includes:
Patcher
Defined in:
lib/datadog/ci/contrib/selenium/patcher.rb

Overview

Patcher enables patching of ‘Selenium::WebDriver’ module.

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



19
20
21
22
23
24
25
26
27
# File 'lib/datadog/ci/contrib/selenium/patcher.rb', line 19

def patch
  ::Selenium::WebDriver::Driver.include(Driver)
  ::Selenium::WebDriver::Navigation.include(Navigation)

  # capybara calls `reset!` after each test, so we need to patch it as well
  if defined?(::Capybara::Selenium::Driver)
    ::Capybara::Selenium::Driver.include(CapybaraDriver)
  end
end