Sha256: 19ae950a5ca7efd45dbee8015b53bfd93fb6ce7d14a5da253081763d35404206
Contents?: true
Size: 640 Bytes
Versions: 22
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true # # frozen_string_literal: true if defined?(Capybara) Capybara.register_driver(:headless_chrome) do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( chromeOptions: { args: %w(headless disable-gpu window-size=1366,1768) } ) Capybara::Selenium::Driver.new( app, browser: :chrome, desired_capabilities: capabilities ) end if RUBY_PLATFORM.match?(/darwin/) Capybara::Screenshot.register_driver(:headless_chrome) do |driver, path| driver.browser.save_screenshot(path) end end Capybara.javascript_driver = :headless_chrome end
Version data entries
22 entries across 22 versions & 1 rubygems