mattheworiordan / capybara-screenshot

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

Keep last error with naming `screenshot_last.html` instead of `screenshot_#{time}.html #269

Open bekicot opened 4 years ago

bekicot commented 4 years ago

When I'm debugging test failure, I usually open the screenshot file in a browser. e.g

Jepretan Layar 2020-01-10 pukul 17 55 36

And then I made some changes to that specific error. If another error happens. I have to open the screenshot directory, order it by created time and select the topmost screenshot to see what is happening.

It would be tedious when I have a complex error, small changes may result in another error. And I have to redo the step above (Open dir, order file, click the topmost file)

Is there any possibility to keep the last error naming with screenshot_last_error.html

so that when I reload the browser, and then I get the latest error information.

I do not really care if the screenshot has to be duplicated in order to achieve it.