RE framework challenge

Hi, I created a very basic flow for my application. There is no excel or any input needed from external file. its just click here then click on next screen.
Now as a project requirement i have to take the screenshot of the error message whenever the script fail. I tried to add command to take screen shot in try catch. but i was not able to do that. now i am planning to use a RE framework first time, and not sure how to start, what changes in config file is needed. where i have to put this flow which i entered. I saw lot of examples of RE framework, but all are about take data from input file . as i am very new,for RE framework, it will be great if someone share some examples which will fit in my scenario

Hi @michelle02,
Welcome to the UiPath Community Forum!

Actually you can easily capture the screenshots in your current workflow.
Step 1. You can have a try catch block and put all your activities inside Try block.
Step 2. Inside Catch block (System.Exception) place two activities i.e. 1) Take screenshot 2)Save image
step 3. after that do not indicate anything in Take Screenshot Activity but create an output variable (image datatype) → for ex. yourOutputImageVar
step 4. pass yourOutputImageVar inside Save image activity and pass the filepath as well for ex. “C:\NewFolder\yourScreenshotName.jpg” your screenshot will get saved in that New folder with file name “yourScreenShotName”

Hope this will work for you.
Thanks!

1 Like

Hi Deepak , thank you for the help. it worked, i am able to take the screenshot as you mentioned, but now because of using try catch the scripts are passed in orchestrator . but in actual it failed and took the screenshot, so how i should deal with such situation.
I want to take screenshot wherever any step failed and in orchestrator also it should say failed.
Please help