How To Take A Screenshot Of The Full/ Selected Region On The Screen

How to take a screenshot of the selected region on the screen and how to take a screenshot of the entire screen?

UiPath has an inbuilt activity “Take Screenshot” activity in UiPath.Core.Activities (~which is now a part of Uipath.System.Activities). This Take Screenshot activity can be used to take a screenshot of a specified UI element.

Steps mentioned below:

  1. Create a sample process and ensure to install Uipath.System.Activities from Manage packages.
  2. From the Activities pane, search for 'Take Screenshot' activity and drag the same into the designer pane.

  1. Set the required Target (Input) in the Properties pane.
Required parameters:
  • Selector: The target window.
  • ClippingRegion (Keep this field blank if a screenshot of the entire screen is needed): Defines the clipping rectangle, in pixels, relative to the UiElement, in the following directions: left, top, right, bottom. It supports both positive and negative numbers.
  1. Set the required Output parameter from the Properties pane.

Output :

  • Screenshot: The resulted screenshot. The field supports only Image variables.

  1. To save the taken screenshot, drag “Save Image” activity into the designer pane to save the screenshot to the specified location.

Input:

File Name: The full file path where you want to save the image, and its name. The screenshot can be saved as a “png” or “jpg” file.

Output:

Target Window:

Resulted screenshot:

Note: If Modern Design Experience is used, the Take Screenshot must be added inside a Use Application/Browser activity.