How to take screenshot after every step automatically?

Why is there no option to take screenshot after each step automatically during web UI automation?

There is option to take screenshot on failed step, but I need to take screenshots for all steps?. I see older posts but no resolution.

Does anyone have a solution for it?

There is the option to “Enable Video Recorder During Execution”. A video is just a collection of still frames, isn’t it?

And, how about:

even better, make use of a Global Variable and save your screen shots in a specific TC folder:

GlobalVariable.gReportPathway = ".\\Reports\\Screenshots\\MyTestCase\\" 

WebUI.takeScreenShot(GlobalVariable.gReportPathway + "screenshot1.png")

As well, if you can program, then maybe you can do something like kazurayam has done below:

1 Like

Because nobody would use it, perhaps.

Automated screenshooting for every single steps will more annoy you than help. It would take far longer time to run a Test Case with automated-screenshooting; as taking a screenshot requires a few seconds (say 5 seconds) each. If your Test Case has 40 steps, then running it would take 3 minutes longer. Also you would have to spend long hours to look up a single valuable image out of dozens of garbages. A PNG image file occupies so much disk space (e.g, 2 mega bytes) that you would have to swipe the garbages away manually.

You should focus tight when taking a screenshot.

1 Like