Sha256: de54c7b487f896de046abccc5b31324c6cc537978bb72743374970da9f9d3e71

Contents?: true

Size: 471 Bytes

Versions: 12

Compression:

Stored size: 471 Bytes

Contents

require 'chromedriver-helper'
require 'selenium-webdriver'

Capybara.register_driver(:chrome_headless) do |app|
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
    'chromeOptions' => { args: %w[headless disable-gpu] }
  )

  Capybara::Selenium::Driver.new(
    app,
    browser: :chrome,
    desired_capabilities: capabilities
  )
end

Capybara::Screenshot.register_driver(:chrome_headless) do |driver, path|
  driver.browser.save_screenshot(path)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ndr_dev_support-5.3.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-5.2.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-5.1.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-5.0.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-5.0.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.2.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.2.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.1.3 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.1.2 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.1.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.1.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-4.0.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb