mattheworiordan / capybara-screenshot

Automatically save screen shots when a Capybara scenario fails
MIT License
1.02k stars 168 forks source link

Add support for cuprite #270

Closed jarthod closed 4 years ago

jarthod commented 4 years ago

cuprite is a modern pure-ruby driver for Chrome headless, which replaces the selenium + chromedriver combo. It supports screenshots the default capybara screenshot method (so it already works with capybara-screenshot) but produces partial screenshots and warnings in the console (as expected):

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

So as it's easy I added support for the cuprite driver with the "full" option to get complete screenshot and no more warning. It works fine in my project and I also added specs :tada:

Thank you for this project and let me know if I can do anything else ;)

mattheworiordan commented 4 years ago

Thanks for this contribution, apologies I missed this when you submitted it