Sha256: 8a09a4a05c77f859700dcd264f975d0d5fa01786e30e09c384dea70f482918e3

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

require 'selenium-webdriver'
require 'show_me_the_cookies'

Capybara.register_driver(:chrome_headless) do |app|
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
    chromeOptions: {
      args: %w[
        headless disable-gpu no-sandbox
        --window-size=1920,1080
        --enable-features=NetworkService,NetworkServiceInProcess
      ]
    }
  )

  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

ShowMeTheCookies.register_adapter(:chrome_headless, ShowMeTheCookies::SeleniumChrome)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ndr_dev_support-5.4.1 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
ndr_dev_support-5.4.0 lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb