Activities
latest
false
Banner background image
UI Automation Activities
Last updated Apr 26, 2024

TakeScreenshot

Takes a screenshot of a specified UI element or application and saves it to a file.

This API must be added after Open or Attach.

Definition

Namespace: UiPath.UIAutomationNext.API.Models

Assembly: UiPath.UIAutomationNext.API.Models (in UiPath.UIAutomationNext.API.Models dll)

Overloads

OverloadDescription
TakeScreenshot(IElementDescriptor, TakeScreenshotOptions)Takes a screenshot of a specified UI element or application and saves it to a file, identified by a descriptor of an element from Object Repository.
TakeScreenshot(IElementDescriptor, String)Takes a screenshot of a specified UI element or application and saves it to a file, identified by a descriptor of an element from Object Repository, while specifying the file name.
TakeScreenshot(String, TakeScreenshotOptions)Takes a screenshot of a specified UI element or application and saves it to a file, identified by a string from Object Repository, along with other configurations.
TakeScreenshot(String, String)Takes a screenshot of a specified UI element or application and saves it to a file, identified by a string from Object Repository, along with other configurations.
TakeScreenshot(RuntimeTarget, TakeScreenshotOptions)Takes a screenshot of a specified UI element or application and saves it to a file, identified by a runtime instance of an Object Repository element, along with other configurations.
TakeScreenshot(TargetAnchorableModel, TakeScreenshotOptions)Takes a screenshot of a specified UI element or application and saves it to a file, identified by the TargetAnchorableModel object, along with other configurations.
TakeScreenshot(TargetAnchorableModel, String)Takes a screenshot of a specified UI element or application and saves it to a file, identified by the TargetAnchorableModel object, while specifying the file name.

TakeScreenshot(IElementDescriptor, TakeScreenshotOptions)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by a descriptor of an element from Object Repository.

TakeScreenhot(
    IElementDescriptor elementDescriptor,
    TakeScreenshotOptions takeScreenshotOptions)TakeScreenhot(
    IElementDescriptor elementDescriptor,
    TakeScreenshotOptions takeScreenshotOptions)
elementDescriptor IElementDescriptor
The element descriptor to take the screenshot from. Leave null to take a screenshot of the entire desktop.
takeScreenshotOptions TakeScreenshotOptions
Additional options to customize the screenshot. You can choose to customize:
  • TargetOptions:
    • Timeout - Specifies the amount of time (in seconds) to wait for the API to run before the SelectorNotFoundException error is thrown. The default value is 30 seconds.
    • DelayAfter - Delay time (in seconds) after executing the API. The default amount of time is 0.3 seconds (300 milliseconds).
    • DelayBefore - Delay time (in seconds) before the API begins performing any operations. The default amount of time is 0.2 seconds (200 milliseconds).
  • FileName - The name of the file you want to save.

TakeScreenshot(IElementDescriptor, String)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by a descriptor of an element from Object Repository, while specifying the file name.

TakeScreenhot(
    IElementDescriptor elementDescriptor,
    string fileName)TakeScreenhot(
    IElementDescriptor elementDescriptor,
    string fileName)
elementDescriptor IElementDescriptor
The element descriptor to take the screenshot from. Leave null to take a screenshot of the entire desktop.
fileName String
The name of the file you want to save.

TakeScreenshot(String, TakeScreenshotOptions)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by a string from Object Repository, along with other configurations.

TakeScreenhot(
    string target,
    TakeScreenshotOptions takeScreenshotOptions)TakeScreenhot(
    string target,
    TakeScreenshotOptions takeScreenshotOptions)
target String
The target to take a screenshot from, identified by a string from Object Repository. Leave null to take a screenshot of the entire desktop.
takeScreenshotOptions TakeScreenshotOptions
Additional options to customize the screenshot. You can choose to customize:
  • TargetOptions:
    • Timeout - Specifies the amount of time (in seconds) to wait for the API to run before the SelectorNotFoundException error is thrown. The default value is 30 seconds.
    • DelayAfter - Delay time (in seconds) after executing the API. The default amount of time is 0.3 seconds (300 milliseconds).
    • DelayBefore - Delay time (in seconds) before the API begins performing any operations. The default amount of time is 0.2 seconds (200 milliseconds).
  • FileName - The name of the file you want to save.

TakeScreenshot(String, String)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by a string from Object Repository, along with other configurations.

TakeScreenhot(
    string target,
    string fileName)TakeScreenhot(
    string target,
    string fileName)
target String
The target to take a screenshot from, identified by a string from Object Repository. Leave null to take a screenshot of the entire desktop.
fileName String
The name of the file you want to save.

TakeScreenshot(RuntimeTarget, TakeScreenshotOptions)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by a runtime instance of an Object Repository element, along with other configurations.

TakeScreenhot(
    RuntimeTarget target,
    TakeScreenshotOptions takeScreenshotOptions)TakeScreenhot(
    RuntimeTarget target,
    TakeScreenshotOptions takeScreenshotOptions)
target RuntimeTarget
The target to take a screenshot from, identified by a runtime instance of an Object Repository element. Leave null to take a screenshot of the entire desktop.
takeScreenshotOptions TakeScreenshotOptions
Additional options to customize the screenshot. You can choose to customize:
  • TargetOptions:
    • Timeout - Specifies the amount of time (in seconds) to wait for the API to run before the SelectorNotFoundException error is thrown. The default value is 30 seconds.
    • DelayAfter - Delay time (in seconds) after executing the API. The default amount of time is 0.3 seconds (300 milliseconds).
    • DelayBefore - Delay time (in seconds) before the API begins performing any operations. The default amount of time is 0.2 seconds (200 milliseconds).
  • FileName - The name of the file you want to save.

TakeScreenshot(TargetAnchorableModel, TakeScreenshotOptions)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by the TargetAnchorableModel object, along with other configurations.
TakeScreenhot(
    TargetAnchorableModel target,
    TakeScreenshotOptions takeScreenshotOptions)TakeScreenhot(
    TargetAnchorableModel target,
    TakeScreenshotOptions takeScreenshotOptions)
target TargetAnchorableModel
The target to take a screenshot from, identified by the TargetAnchorableModel object. Leave null to take a screenshot of the entire desktop.
takeScreenshotOptions TakeScreenshotOptions
Additional options to customize the screenshot. You can choose to customize:
  • TargetOptions:
    • Timeout - Specifies the amount of time (in seconds) to wait for the API to run before the SelectorNotFoundException error is thrown. The default value is 30 seconds.
    • DelayAfter - Delay time (in seconds) after executing the API. The default amount of time is 0.3 seconds (300 milliseconds).
    • DelayBefore - Delay time (in seconds) before the API begins performing any operations. The default amount of time is 0.2 seconds (200 milliseconds).
  • FileName - The name of the file you want to save.

TakeScreenshot(TargetAnchorableModel, String)

Takes a screenshot of a specified UI element or application and saves it to a file, identified by the TargetAnchorableModel object, while specifying the file name.
TakeScreenhot(
    TargetAnchorableModel target, 
    string fileName)TakeScreenhot(
    TargetAnchorableModel target, 
    string fileName)
target TargetAnchorableModel
The target to take a screenshot from, identified by the TargetAnchorableModel object. Leave null to take a screenshot of the entire desktop.
fileName String
The name of the file you want to save.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.