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