automa icon indicating copy to clipboard operation
automa copied to clipboard

How do I insert a variable (e.g. date/loop number) in the filename of a screenshot?

Open wellloaded opened this issue 1 year ago • 1 comments

Not a bug, just a simple question:

Like summarized in the title, I would like to better troubleshoot my automation so taking screenshots at specific points/events while it runs overnight.

As far as I can tell, the screenshot block is not designed with the loop in mind and appears to allow a static file name to be stored only.

Is this possible at all? If can this be considered for enhancement?

Thanks

wellloaded avatar May 09 '24 20:05 wellloaded

Storing Screeshots with dynamic name is possible. Here is an example Create and set a variable, you can use automaSetVariable function

image (2).png

Now in the Take Screenshot block You can access the variable using double moustache syntax as shown below image (1).png

If done correctly you will get a result like this image.png

Note: Follow correct naming convention while using dates as Screenshot name, special character will not be allowed based on the operating system you use

dvrbnator avatar May 16 '24 13:05 dvrbnator