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?

