Visual Logging Errors - Screenshot and Variables Help

Hello Everyone,

I’m looking for advise or a better way to accomplish this goal, or maybe if I am off the track here.

Goal: OnError → Capture Screenshot → Save it as the macro name (that just failed) using the variable !Macroname) → LocalStorageExport

Problem: Does not save the file as the name I gave the macro that ran and failed due to error.

Where I am stuck:
Global Macro (in the left menu) called Screenshot that has two commands:
-CaptureEntirePageScreenshot | !MACRONAME.png
-localStorageExport | !MACRONAME.png

Am I not using the variables here correctly? Ideally I’d like to have the file name follow a name format and date. I couldn’t find any example of what I am trying to do.

Thank you!

Hi @Tracch ,
in general you have to use special characters around the variables:
${VARIABLE}

image

To use a date in the filename I prepair it in advance:

target of executeScript:

Please let me know if that solved your problem :slight_smile:

1 Like

Ah! Thank you so much! I was close on the variable part, but your code on getting the date shows how much more I can learn and improve.

Thank you, this gets me back on track!