Module: Capybara::Screenshot::Diff::Drivers

Defined in:
lib/capybara/screenshot/diff/drivers/base_driver.rb,
lib/capybara/screenshot/diff/drivers.rb,
lib/capybara/screenshot/diff/drivers/vips_driver.rb,
lib/capybara/screenshot/diff/drivers/chunky_png_driver.rb

Overview

Compare two images and determine if they are equal, different, or within some comparison range considering color values and difference area size.

Defined Under Namespace

Classes: BaseDriver, ChunkyPNGDriver, VipsDriver

Class Method Summary collapse

Class Method Details

.for(driver_options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/capybara/screenshot/diff/drivers.rb', line 7

def self.for(driver_options = {})
  driver_option = driver_options.fetch(:driver, :chunky_png)
  return driver_option unless driver_option.is_a?(Symbol)

  Utils.find_driver_class_for(driver_option).new
end