Last Updated: February 25, 2016
· nruth

Responsive site screenshots with capybara (ruby)

Having moved to Bootstrap 3 or similar so your site works on various screen sizes and devices, it's useful to get an idea of what those devices can actually see during various workflows in your web-app.

This is a lot like integration testing, and it turns out you can reuse Capybara and all your existing test infrastructure for capturing images of your app at various screen sizes, using selenium-webdriver, poltergeist, and perhaps other drivers.

I haven't turned this into a gem yet, but the following may help you get started doing something similar in your app.