Screenshot when an exception occurs

I am seeking a way to take a screenshot when an exception occurs, but I would like it to be of the application rather than the activity in UiPath.
I am using UiPath Studio.
Best regards.

Hi @Matias_Clemente.Arg,

In re-framework, there is already a sample xaml for screenshot capturing which captures the whole screen whenever system exception occurs or that workflow is called.

I am attaching that here as well for you. You can customize it as per your requirement.

TakeScreenshot.xaml (8.0 KB)

Regards
Sonali

Yes, but the screenshot is of the UiPath interface, not the application. Is it possible to do it as I need?
I need to see what is happening in the application.

@Matias_Clemente.Arg,

Right now, screenshot is of the UiPath because no other application has yet been opened by UiPath.

It happens like below:

  1. bot start oerforming operations on the application.
  2. its interacting, typing etc and then suddenly system exception happened, so bot would right then take screenshot of the screen system exception got thrown on and save it.

If you are not using re-framework, you will need to put the activity take screenshot in the catch block of the system excpetion, so it captures it.

if you are using re-framework, its automatically handled. run some process which is interacting with an application and when system exception happens, it will take screenshot of the screen where bot was and exception happened.

Regards
Sonali

@Matias_Clemente.Arg,

To achieve this using Take Screenshot xaml from REFramework, Use Activate activity before invoking Take Screenshot. This will bring a window of desired application to the foreground.

hola a todos, gracias por sus respuestas, voy a probarlas y luego les comento como me fue.

1 Like