Migrating Your Capybara Driver from PhantomJS to Headless ChromeDriver
Newsflash: Vitaly Slobodin, the PhantomJS maintainer, is stepping down, since Google Chrome version 59 will ship with its own headless option. This means you’re going to have to move all your capybara tests from PhantomJS into ChromeDriver.
If you’re coming from poltergeist, which runs PhantomJS, you’lll have to install selenium-webdriver,
Then you’ll have to install the latest chromedriver
brew install chromedriver
Then register selenium-webdriver as your capybara driver, with chrome as the browser.
For more chromeOptions
: check the headless chrome documentation.
disable-gpu
is temporarily required to run headless, but it may not be necessary in the future.