Subscribe

UiPath Activities

The UiPath Activities Guide

Take Screenshot

UiPath.UIAutomationNext.Activities.NTakeScreenshot

Description

Takes a screenshot of a specified UI element or application and saves it as an image file. This activity must be added inside a Use Application/Browser activity.

In the body of the activity, use the radio buttons to choose the output type, which can be:

  • File - Saves the screenshot to file at a specified location.
  • Image - Saves the screenshot to the indicated image.
  • Clipboard - Saves the screenshot as an image to clipboard for later use.
Properties

Common

  • Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
  • Delay before screenshot - Delay (in seconds) between the time the element is brought into the foreground and the time the screenshot is taken. The default value is 0.2 seconds.
  • DisplayName - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.
  • Timeout - Specify a number of seconds for which to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

Input

  • Auto increment - Select what to append to the filename when saving the screenshot in case of filename conflicts. For example, if a file with the same name as the one you save already exists, choosing Index keeps the file name, creating a new file for each screenshot and adding an index number to each, consecutively. The options are None (if a file with the same name already exists, replace it), Index (add a number to the filename, for example screenshot (1).png), or DateTime (add the date and time when the screenshot is taken to the filename in the format YYYY.MM.DD at HH.MM.SS).
  • File name - The name of the file where the screenshot of the specified UI elemend will be saved.
  • Target - Before indicating on screen the application you want to automate, this field is set to (null). Once the target is indicated, all properties regarding the element that was indicated are displayed.

Input/Output Element

  • Input Element - The Input UI Element that defines the screen element that the activity will be executed on.
  • Onput Element - Output a UI Element to use in other activities as an Input UI Element.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Output

  • Saved file path - The full path to the file where to save the screenshot, including the appended suffix, if applicable. This also dictates where the Auto increment property saves the indexed screenshot files.
  • Saved image - The screenshot saved as Image; used when Output is set to image.

UiPath.UIAutomationNext.Activities.NTakeScreenshot

Description

Takes a screenshot of a specified UI element or application and saves it as an image file. This activity must be added inside a Use Application/Browser activity.

Configuring the Activity

In the Body of the Activity

  • Click Indicate target on screen to indicate which UI element to capture in the screenshot.
  • File Name - Click Browse browse files next to the field, then browse to the folder where to save the screenshot, and specify the file name and extension to use.
  • IUse the radio buttons to choose the output type, which can be:
    • File - Saves the screenshot to file at a specified location.
    • Image - Saves the screenshot to the indicated image.
    • Clipboard - Saves the screenshot as an image to clipboard for later use.
    Alternatively, you can click Plus plus button on the right side of the field and then, from the menu, choose one of the available options to indicate the file to save as:
    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains a file path, or indicate a field from a selected email in Outlook that contains a file path.
    • Use Saved Value - Select a value in the form of a file path that you previously saved for later use in the project.
    • Text - Enter a file path in the Text Builder.
    • Ask when run - Prompt for a file path when the project is executed.
    • Paste from clipboard - Paste a value in the form of a file path that you previously copied to the clipboard in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Auto increment - Select what to append to the filename when saving the screenshot in case of filename conflicts. For example, if a file with the same name as the one you save already exists, choosing Index keeps the file name, creating a new file for each screenshot and adding an index number to each, consecutively.
    • None (overwrite) - If a file with the same name already exists, replace it.
    • Index - Add a number to the filename, for example screenshot (1).png.
    • YYYY.MM.DD at HH.MM.SS - Add the date and time when the screenshot is taken to the filename, for example screenshot 2020.06.22 at 10:22:32.
  • File name - The name of the file where the screenshot of the specified UI elemend will be saved.
  • After you indicate the target, click Menu Options button to access the following options:
    • Indicate target on screen - Indicate the target again.
    • Edit Target - Open the selection mode to configure the target.

For more information about indicating and configuring targets, see About the UIAutomationNext Activities Pack.

In the Properties Panel

Common

  • Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
  • Delay before screenshot - Delay (in seconds) between the time the element is brought into the foreground and the time the screenshot is taken. The default value is 0.2 seconds.
  • DisplayName - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.
  • Timeout - Specify a number of seconds for which to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

Input

Input/Output Element

  • Input Element - The Input UI Element that defines the screen element that the activity will be executed on.
  • Onput Element - Output a UI Element to use in other activities as an Input UI Element.

Misc

  • Private - If selected, the data used by the activity is not saved to the StudioX logs when the project is executed.

Output

  • Saved file path - The full path to the file where to save the screenshot, including the appended suffix, if applicable. This also dictates where the Auto increment property saves the indexed screenshot files.
  • Saved image - The screenshot saved as Image; used when Output is set to image.

Updated about a month ago


Take Screenshot


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.