0

I want to use Selenium IDE to capture screenshots of page every day at midnight. I have created an easy test and scheduled it in the internal IDE scheduler. The problem is with printscreens files names, they are always the same and they are replaced, but I need to store them.

Im using command: captureEntirePageScreenshot C:\Screenshots\test.png

Is there any way to use Selenium to create file with current date? Or if not is there any possibility to create new files without deleting old ones (for example test(1).png, test(2).png etc.)?

dabblyou
  • 11
  • 4

1 Answers1

0

Check this out:

storeEval                   | new Date().getDate() | date
captureEntirePageScreenshot | C:\Screenshots\test(${date}).png

First command will take the day of the month (for example 13 for 13th of July). The second command will do a screenshot = C:\Screenshots\test(13).png

That way you will store screenshots for one month. If you need even more you can store month like

storeEval | new Date().getMonth() | month

Good luck

Antesser
  • 669
  • 4
  • 5