Identifier expected in Save Image activity

Hi,

I’m getting ‘Identified expected’ msg while trying to save an image into a local folder using Save Image activity. For FileName(String) using the following “ScreenshotsFolder”+“"+Now.ToString.{“dd-mm-yy-hh-ss”}+”.png" expression.
Please let me know if I’m missing anything.

Thanks.
Abhi

change those brackets into parenthesis and remove the dot as well after ToString

Please try this instead

ScreenshotsFolder + "" + Now.ToString(“dd-MM-yy-hh-mm-ss”) + “.png”. It should work.

It’s working. Thank you.
Need another clarification regarding Save Image activity. After Take Screenshot activity where BoT is saving Output Screenshot(Image) using imgsapscreenshots name I’ve used Save Image activity where used Input imgsapscreenshots image in ScreenshotsFolder. But BoT is unable to save screenshots from SAP portal where I’ve already enabled the SAP GUI elements both local server and SAP server. Please suggest.

Please check if proper selectors are generated for the SAP Window. Keep only these two activities (Take Screenshot and Save Image) in a seperate workflow and try to debug.

Considered Take Screenshot and Save Image activity in a separate workflow. SAP window selector is “” used for the complete SAP window. After debugging found selector is failing sometimes but it’s unable to save the .png image in local drive. I’ve activated the SAP elements both from local and SAP server for this automation. Am I missing anything.

If we want to take the whole page as screenshot then we don’t need to select any element with TAKE SCREENSHOT activity
That is just use Take screenshot activity and get the output with a variable of type image and pass that variable to Save image activity

Or

If we want to get specific element make sure that the activity is used inside the ATTACH WINDOW activity
Or GET ACTIVE WINDOW activity

Cheers @rayabhijit2017

Thanks for your suggestions. For taking whole page screenshot we have used Attach Window activity where we have used Take screenshot activity. Images are now getting saved.

Great
@rayabhijit2017