If you like having a glance at what happens during your integration test run, you probably know
They both have their drawbacks :
#save_and_open_pagedisplays raw html, with no css nor js
#screenshotlooks exactly to what you expect, but now you can't use inspector or firebug.
There's an alternative for that. Instead of letting capybara saving your html file in
tmp/capybara/, you could force it to save it in
# spec/support/integration_helpers.rb def show_page save_page Rails.root.join( 'public', 'capybara.html' ) %x(launchy http://localhost:3000/capybara.html) end
That way, it will find and use css and js files.
Do not forget to add
public/capybara.html in your
Note that if you want to see the state of your page after a few js operations,
#screenshot is still better, because
#show_page will run js initialization, so js runtime state will be reset.