Search code examples
rspeccapybaraapparition

Using capybara-screenshot with apparition


I have seamlessly converted from poltergeist to the apparition gem, but am using the capybara-screenshot gem to generate an html snapshot of the page when a test fails. I am seeing the warning:

capybara-screenshot could not detect a screenshot driver for 'apparition'. Saving with default with unknown results.

It turns out the default is OK, because the resultant screenshot is good. How do I stop this warning message?


Solution

  • You can get rid of the warning by using the master branch of capybara-screenshot.

    gem 'capybara-screenshot', github: 'mattheworiordan/capybara-screenshot'
    

    Apparition is a new driver and isn't yet supported in a released version of capybara-screenshot - but was added to the code at the end of June - https://github.com/mattheworiordan/capybara-screenshot/commit/273317b241d1d1d8600b32fad998742894424f3b