List of Projects OSRA - Support system Technical discussions headless capybara drive justification

headless capybara drive justification

Updated about 6 years ago by Craig Ferry

Headless capybara driver justification

We require a headless capybara driver to test javascript (currently delete links through active admin)

Our main options are

  • capybara-webkit

  • poltergeist

Both have dependencies that need to be met, but I think the webkit dependencies are more demanding.

Website on have settled on poltergeist. I have asked the channel and they seem happy with their decision.


I haven’t researched this exhaustively. These are my initial first impressions. If you feel there is misinformation in here or I have got things plain wrong, please let me know.

Capybara Webkit

This requires a whole raft of qt dependencies. Pretty frustating if you have to compile on a mac or are using stock ubuntu.


  • You can interact with the javascript popup dialog.


  • Dependency hell (qt and xvfb)

  • xvfb-run -a bundle exec cucumber is needed to run the cucumber tests (or apparently the addition of a ‘headless’ gem which I haven’t researched further)

Poltergeist (Phantomjs)


  • only gem and phantomjs dependencies

    • phantomjs dependency can be downloaded and installed manually or through nodejs (my preference)


  • You cannot interact with the javascript popup dialog

    • Default accept of js popups - can only test the happy path


comments powered by Disqus