Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wellloaded opened this issue May 9, 2024 · 1 comment

Comments

@wellloaded
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants