使用 capybara-screenshot 和 apparition

Using capybara-screenshot with apparition

我已经从 poltergeist 无缝转换为 apparition gem,但我正在使用 capybara-screenshot gem 生成 html测试失败时的页面快照。我看到了警告:

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

原来默认就OK了,因为截图效果不错。如何停止此警告消息?

您可以使用 capybara-screenshot 的 master 分支来消除警告。

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

Apparition 是一个新的驱动程序,capybara-screenshot 的发布版本尚不支持 - 但已在 6 月底添加到代码中 - https://github.com/mattheworiordan/capybara-screenshot/commit/273317b241d1d1d8600b32fad998742894424f3b