# 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.

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-b90b7c2853d5c1b061e8a98776c42c31d0e41c9a%2FWord_take_screenshot.png?alt=media)

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");
```
