How to take a screenshot?

I made the macro to run as soon as the file opens but I need to take a screenshot if the background changes, like if any message box/ error displays while running a macro in excel. Can anyone help me with this?

Hi @LathaBasavaraju

Could you please clarify if you use RPA Express or SPA?

i use RPA Express only

i made macro to runs if the file is opened but i need to capture errors if any run time error exists,

If I understand you correctly you want to make a screenshot when the error occurs, but it can occur anytime. I’m not sure it can be done with actions flow. Could you please clarify if the error message is always the same or it differs?

it may differ, in a simple words i can say i need to test the macros. the errors may/may not occurs, it depends

since there is no option to run macro directly, i’m opening macro file by giving its path in window tray,and macro executes automatically as it opens but if any error occurs during execution workfusion is not able to identify that so i need to know is there any method for making workfusion to capture that errors and save it in a separate document

Hi again @LathaBasavaraju
I’m not sure it can be done, as error can occur any time and errors can differ (as I understand they’re not the same) and sometimes it doesn’t occur. If the error was the same, probably “Wait for image” action could help you. But as it can occur any time, don’t think it can help.

There is no other methods to save that error other than screenshot?

Sorry, I mean my aim is to save/documents the any errors occurred during execution of macro so please can I know is this possible, workfusion is not detecting the .xlsm window I thought about screenshot but that is also not possible. Please let me know if there is any other methods?

Could you share an example of the exception while running macros, does it always have the same title?
Also, I think it would be easier to handle the error inside your macros, not using RPA Express. As it won’t be an easy solution.