Take screenshot of entire desktop using modern activities

The Modern Activities documentation for the Take Screenshot activity ( Take Screenshot (uipath.com)) explains that “If added outside of an application card, since there is no target specified, the entire desktop is captured.”.

This is not true, as within Studio, the Take Screenshot activity will not function without a surrounding app/browser scope meaning that it is impossible to take a screenshot of the entire desktop, only a specific app/browser window:

I have worked around this in the past using the following selector to trick the app scope into taking a screenshot of the entire desktop, but it is inconsistent and occasionally throws a mscorlib exception.

<wnd app='explorer.exe' cls='Progman' title='Program Manager' />
<wnd cls='SysListView32' title='FolderView' />

Assuming the documentation is correct, I must be misunderstanding how to use the Take Screenshot activity outside of an application scope and I hope someone can explain the correct usage. If the documentation is incorrect, is there a more reliable way to take a screenshot of the entire desktop using the modern Take Screenshot activity?

Hello @s.bruce

You can enable classic activities in the project from the Activities panel and then use the classic screenshot activity.

If you are going with modern screenshot you will have to indicate on a element to take the screenshot.

Hi @s.bruce

if you want to take screenshot in modern design then, you have to indicate the screen. Then it will work.


Hi @s.bruce ,

Could you update all the Dependencies to the latest version and Check ?

It appears the behaviour of the activity has changed between the 21.10 and 22.4 versions of the package - you cannot use the 21.10 version outside of an app scope but this is allowed with 22.4.

I will update the packages, thank you.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.