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