Question

Keystrokes fail in unattended mode only after Open File/Program command (cmd batch file)

  • 22 February 2022
  • 3 replies
  • 53 views

Keystrokes work fine for me in unattended bot with closed remote desktop generally. However, they are not working (no error but also not doing anything, visible at least) when they follow specifically a Open Program/File command that executes a batch file in the cmd prompt. A screenshot before the keystrokes command also comes fully black, which might be related. Without the Open Program/File command, everything works including the screenshot.

Kindly help.


3 replies

Userlevel 5
Badge +8

Hi @Bruno Filipe Chanca Sampaio​ ,

 

Checkout below KB for resolution,

 

https://apeople.automationanywhere.com/s/article/Commands-like-Object-Cloning-Image-Recognition-Keystrokes-Etc-Do-Not-Work-In-Unattended-Mode-When-Autologin-Is-Enabled-And-Error-Out-With-Black-Screenshot-On-Failure/p>

Userlevel 3
Badge +6

Dear @BrunoSampaio,

 

Regarding your question, keystrokes work independent of deployment type, however you must remember that they only operate on the element that is designed to work if that element is focused.

When it comes to screenshots, the one mistake I that comes to me is when the File directory specified does not exist on the server where you are running it.
You should consider if you are including the absolute path, i.e., the directory path that contains the username.

 

Regards,

Userlevel 7
Badge +10

Hi @BrunoSampaio ,

 

The main reason for getting the black screenshot is that last log-out from the RDP session was improper. You may use the enclosed batch file to perform the logout action in the runner machine.

 

Note: Please ensure that there is no other active session on the runner machine while BOT execution.

Reply