Edit on GitHub


To use Chrome, ensure you’re using the appropriate driver

Starting Chrome

b =


Chrome has a new headless feature that can be accessed directly with: :chrome, headless: true

It is still under active development so not all features work yet (alerts, window switching, etc)

Chrome Options

The options hash can be created with the following parameters:

  • :args - an Array of command-line arguments to use when starting Chrome
  • :binary - a String representing the Path to the Chrome Browser executable to use
  • :prefs - a Hash with each entry consisting of the name of the preference and its value
  • :extensions - an Array of Strings listing the paths to (.crx) Chrome extensions to install on startup
  • :options - a Hash for raw options
  • :emulation - A Hash for raw emulation options


Information on configuring preferences can be found here

prefs = {
  download: {
    prompt_for_download: false,
    default_directory: '/path/to/dir'

b = :chrome, options: {prefs: prefs}


See the full list of switches here

args = ['--ignore-certificate-errors', '--disable-popup-blocking', '--disable-translate']
b = :chrome, options: {args: args}

Raw Options

See the full list of options here

b = :chrome, options: {options: {detach: true}}