Sha256: 1e6ecd065e54b55149bb8efcabbc65d091033c7ed91fded6f7babded09706915

Contents?: true

Size: 441 Bytes

Versions: 6

Compression:

Stored size: 441 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
ndr_dev_support-5.3.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-3.1.3 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-3.1.2 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-3.1.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-3.1.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-3.0.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb