Unable to save screenshot in date time format using asset activity

Hi, I am using allegro thick client application to automate the process, And i would like to save to screenshot in the format ApplicationName_MachineName_Current date/Time whenever the script fails.I am currently using 5 different locations to run the application,
so i have create a asset in orchestrator and gave the path like

for atlanta location VM- “C:\XOM\Temp\RPA\AllegroHorizon_Atl01_”+DateTime.now.tostring(“ddMMyyyy-hh-mm-ss”)+“.jpeg”

for Dallas location VM-

Whenever i run the job through orchestrator it says- Save Image: Save image failed. Check if the file name is a valid path.
The same path works without using asset but not after using asset activity. . Is it because of double quotes in the path?? but if i don’t use double quotes then how i will add date time logic in the path?

the machine is connected to the orchestrator

In orchestrator

Also this save screenshot activity is in catch block, as once there is an exception then only screenshot activity will take place

In asset keep the value till
“…DAL04_” without datetime in it
And get the asset value in studio with Get assets activity
Then inside the studio use that DateTime method by concatenating them
—that is if we get the asset variable from get asset activity named str_input

To check how it works when asset is key with DateTime in it
That is keep the datetime in asset along with your file path and get that asset with Get Asset activity with a variable of type string and mention that in a Writeline activity do that we can validate on the value like how the path actually will look like

Cheers @michelle02

Thank you for your help ,it worked

1 Like

Cheers @michelle02

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.