Unable to capture full-screen screenshot when System Exception occurs in UiPath

Hi Team,

I’m working on a normal UiPath sequence (not using REFramework), and I want to automatically take a screenshot whenever a System Exception occurs during the process.

Requirement:

I want UiPath to capture the screen at the exact point where the exception happens, so I can later review what went wrong. The screenshot should include the entire screen, not just a specific application window, and it should be saved in a particular folder with the current date and time in the filename.

Problem I’m facing:

I tried using the Take Screenshot activity inside a Try-Catch block under the Catch → System Exception section, but it’s not working properly.

Sometimes the screenshot is not being saved, sometimes it’s blank, it take UiPath screen itself and other times it only captures a specific page.

If the screen changes (for example, the error happens in a different application or window), it doesn’t capture that new screen properly.

My questions:

What is the correct way or position to place the Take Screenshot activity so that it captures the screen exactly when a System Exception occurs?

How can I make sure the screenshot is saved even if the application closes or crashes right after the exception?

Is there any delay or method needed before taking the screenshot to ensure the image is properly captured?

How can I take a full-screen capture instead of just a specific window in the Take Screenshot activity?

If the process moves to a different screen or page when the error occurs, how can I ensure that UiPath still captures the correct screenshot for that error?

Can anyone please share a simple example or best practice for this kind of setup in a normal sequence?

1 Like

Hi, @Vikas_b_Sajjan

Place the Take Screenshot activity inside the Catch block of a Try-Catch leave the selector blank to capture the full screen and immediately save the image with a timestamped filename in your folder…then Add a short delay before taking the screenshot to ensure screen stability and use Activate activity if needed to bring the error screen forward before capturing.

what to indicate to the screen for that, it should be dynamic, if the page changes or other page exception, it will give indicated screenshot , that i not required, i want dynamic one.

and how to blank the selector, first we indicate the screen and blank it, from where, which screen to indicate first?
give me some detailed explanation for that.

@Vikas_b_Sajjan,

Just use REFramework provided Take Screenshot workflow in your bot.

No need to indicate anything. Let it as it is and it will take full screen screenshot.