Skip to main content

Take Element Screenshot

Captures a screenshot of a desktop element and saves it to a specified directory.

Category: Desktop Application Automation · Group: Desktop · Activity name: TakeScreenshot

The TakeScreenshot activity in the designer

Example

outputVariable = TakeScreenshot("xPath", expandX=0, expandY=0, elementScreenshotFilePathName="<elementScreenshotFilePathName>")

Inputs

NameTypeRequiredDefaultDescription
Element Target MethodstringYesxPathMethod to identify the desktop element. One of: xPath, referenceText, referenceImage.
Expand HorizontallyintegerThe number of pixels to expand the screenshot in the X direction.
Expand VerticallyintegerThe number of pixels to expand the screenshot in the Y direction.
Screenshot NamestringThe name of the screenshot file. If not provided, a default name will be generated.

Outputs

NameTypeDescription
outputVariablestringSpecifies the name of the variable that will store the screenshot path.