I find it handy to keep the browser open when I am writing a Cucumber test, so that I know what to do next.
This is pretty simple to do in your env.rb file. (Note: Chrome always closes when a test is finished no matter what, it is a known bug).
After do |scenario| KEEP_OPEN = true if scenario.status == :pending or scenario.status == :undefined end at_exit do browser.close if not KEEP_OPEN end
Sometimes I keep the browser open on failure too, but this is not very good if you’re running unattended, for example on a CI build, so I often just capture a screenshot instead.