Skip to main content
Solved

Bots Failing to Locate Elements Unattended Mode — Black Screenshots Captured

  • April 28, 2025
  • 2 replies
  • 233 views

bruhfl
Forum|alt.badge.img+1

Hello,

I am facing the following issue: I have some bots running in unattended mode on a virtual machine with Windows Server. After a Windows update, some bots started failing to locate elements or windows. When an exception occurs and the bot sends an email with a screenshot of the desktop, the captured image is completely black.

I have already reinstalled the bot agent, but the problem persists. I also validated the bots by running them in attended mode on the same machine, and in this scenario, the bots executed successfully without any issues.

 

Image from screenshoot

 

Best answer by Padmakumar

Hi ​@bruhfl ,

 

Getting a black screen means that the RDP session is not getting logged out properly which is in fact affecting the unattended automation. You may use either of the below step and let me know the result.

 

  • Use the enclosed .bat file.

or 

  • Go to Run, type Sign out and hit enter.

 

 

2 replies

Forum|alt.badge.img+4
  • Navigator | Tier 3
  • April 28, 2025

Hi,

It looks like the issue is because the user session becomes inactive after the Windows update. When the session is locked or logged off, bots can’t detect elements and screenshots turn black.
You can fix it by enabling auto-login on the VM, and after connecting via RDP.
Also, check group policy settings to prevent sessions from locking or timing out.


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • Answer
  • April 29, 2025

Hi ​@bruhfl ,

 

Getting a black screen means that the RDP session is not getting logged out properly which is in fact affecting the unattended automation. You may use either of the below step and let me know the result.

 

  • Use the enclosed .bat file.

or 

  • Go to Run, type Sign out and hit enter.