TakeScreenshot.xaml

Hallo,
we have set up a process using REF-Framework and there we also use to invoke the TakeScreenshot.xaml.
I checked whether we have filled in both arguments correctly. Now we got in the logfiles this entry:
"Screenshot saved at: V:\aaaa\bbbbb\cccc\ExceptionScreenshots\ExceptionScreenshot_190417.022238.png " so we are shure that it works.
A few minutes later the same xaml is invoked again in the same way and now the result is “Save screenshot: Save image failed. Check if the file name is a valid path”. Is it possible that the taken screenshot image is nothing/empty? How can I check that?

Kind regards
Martin

You can check by running in debug mode and see the variable’s value.

Hello,
thank you for your suggestion. But may be that I don’t understand what you mean.
Yes, I did a debug of this part of the process. I know it works. But I cannot reproduce the circumstances of the error. So I would like to enhance the .xaml and add a check whether the taken image is something or not.
Can I use isNullOrEmpty on image objects? I don’t think so also I don’t kno how to check that. Any suggestions?

You can use an if with the condition Is Nothing in order to check this.
Add logging to output this information as well as the path and other variables used and call the flow from another flow 100 times with 30 sec delay and see what you get, if it’s reproducible, etc.