# Take screenshot

![](https://gblobscdn.gitbook.com/assets%2Fastro-rpa%2F-M-hxUXNOdBhTifh4OEN%2F-M-hxnVNbT3OZVoebQSi%2F0.png?generation=1581319142022829\&alt=media)

Element that makes desktop screenshot. In case you need to take a screenshot of any running process, the Process name should be specified. If you need a screenshot of the entire desktop, leave the Process name blank.

![](/files/8f0XtNZ22SyTfDJ2XXec)

Properties

\- Title: \[String] Application title

\- Process name: \[String] Process name

\- Variable: \[LTools.Desktop.DesktopInst] Variable with process reference

\- Variable: \[System.Drawing.Bitmap] Variable to store image

```
C#
LTools.Desktop.DesktopApp app = LTools.Desktop.DesktopApp.Init(wf, null, "Test_*", 20000, true, LTools.Desktop.Model.DesktopTypes.UIAUTOMATION);
//Desktop
System.Drawing.Bitmap bmp = LTools.Desktop.DesktopApp.CreateScreenshot(wf);
bmp.Save(@"C:\screen1.png");
//Application by title
bmp = app.CreateScreenshot(null, "Test_*");
bmp.Save(@"C:\screen2.png");
//Current application
bmp = app.CreateScreenshot();
bmp.Save(@"C:\screen3.png");

Python
app = LTools.Desktop.DesktopApp.Init(wf, None, "Test_*", 20000, True, LTools.Desktop.Model.DesktopTypes.UIAUTOMATION)
#Desktop
bmp = LTools.Desktop.DesktopApp.CreateScreenshot(wf);
bmp.Save("C:\\screen1.png");
#Application by title
bmp = app.CreateScreenshot(None, "Test_*");
bmp.Save("C:\\screen2.png");
#Current application
bmp = app.CreateScreenshot();
bmp.Save("C:\\screen3.png");

JavaScript
var app = _lib.LTools.Desktop.DesktopApp.Init(wf, null, "Test_*", 20000, true, _lib.LTools.Desktop.Model.DesktopTypes.UIAUTOMATION);
//Desktop
var bmp = _lib.LTools.Desktop.DesktopApp.CreateScreenshot(wf);
bmp.Save("C:\\screen1.png");
//Application by title
bmp = app.CreateScreenshot(null, "Test_*");
bmp.Save("C:\\screen2.png");
//Current application
bmp = app.CreateScreenshot();
bmp.Save("C:\\screen3.png");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astro-rpa.gitbook.io/astro-rpa-user-guide/g_elements/el_basic/els_desktop/el_desktop_screenshot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
