How to use headless chrome with capybara and selenium
Chrome version: 59.0.3071.104 Using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome. features/support/env.rb require 'rubygems' require 'capybara/cucumber' Capybara.register_driver :selenium_chrome do |app| Capybara::Selenium::Driver.new(app, :browser => :chrome, args: ['headless']) end Capybara.default_driver = :selenium_chrome When running a cucumber test, it says: WARN Selenium [DEPRECATION] :args or :switches is deprecated. Use Selenium::WebDriver::Chrome::Options#add_argument instead. What is the correct way to use capybara and selenium with Headless