AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
10.72k stars 1.09k forks source link

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

Open wellloaded opened 1 month ago

wellloaded commented 1 month ago

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

dvrbnator commented 1 month ago

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