Solved

Bot failed to click an object when the VM is minimized

  • 24 December 2022
  • 11 replies
  • 117 views

Badge +7

So i have a bot and the bot runs successfully in the development and the production environment.

I notice that it works fine when we open the VM, but if we minimized the VM the bot failed to capture an object,

Here is the Scheme. PC → VM → run the bot (unattended)

Is there an option to make sure the bot runs succesfully even if i minimized the VM?

icon

Best answer by David Jansen 27 December 2022, 16:36

View original

11 replies

Userlevel 3
Badge +7

Hi @David Jansen ,

 

minimized - most of the cases the bot will fail when you minimize the window because the screen resolution will changing but you can lock machine to while executing the process. 

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/control-room/devices/rdp-deployment-multi-user-device.html

Userlevel 7
Badge +12

Hi @David Jansen

You have mentioned that the automation is Unattended. So, by saying that execution is not happening once the window gets minimised, is the user session active on that runner machine and you are performing the minimise action or the is it performing by the BOT?

 

If the User session is still active and if you are minizing the VM window, definitely it will backfire the BOT execution. Especially for Unattended execution, only BOT session is suggested on the Runner device.

 

You can double check the same by putting a Desktop capture action just infront of any of the Capture or Set text or Keystroke actions. If you are getting a black screen as the screenshot, you can confirm that the BOT session is getting interrupted by other active session on the same machine.

 

Let me know your observation on this.

 

Userlevel 5
Badge +9

Hi @David Jansen 

Can you check whether you are getting any issues in unattended mode instead of minimizing the VM. 

Badge +7

hi @ChanduMohammad@Padmakumar , @Tamil Arasu10 

 

I have checked the unattended mode is not having any issue

 

And no, i do not have black screen as the screenshot and i read some article about it that suggest to run a batch file to dissconnect the rdp and lock/logoff (i have not try this but i am asumming this would work, please do let me know if this is one of the solution)

 

I have also read that we can deploy the bot from one VM to another VM and it would work if we minimized the VM. i don’t actually understand this one so please elaborate me more on this if you understand about it as this seems to be the most simple one

 

 

Userlevel 5
Badge +9

hi @ChanduMohammad@Padmakumar , @Tamil Arasu10 

 

I have checked the unattended mode is not having any issue

 

And yes i do have black screen as the screenshot and read some article about it that suggest to run a batch file to dissconnect the rdp and lock/logoff (i have not try this but i am asumming this would work, please do let me know if this is one of the solution)

 

I have also read that we can deploy the bot from one VM to another VM and it would work if we minimized the VM. i don’t actually understand this one so please elaborate me more on this if you understand about it as this seems to be the most simple one

 

 

Hi @David Jansen 

Please give a try on backscreen resolution, can you share the link where you have read about minimizing the vm?

Badge +7

hi @ChanduMohammad@Padmakumar , @Tamil Arasu10 

 

I have checked the unattended mode is not having any issue

 

And yes i do have black screen as the screenshot and read some article about it that suggest to run a batch file to dissconnect the rdp and lock/logoff (i have not try this but i am asumming this would work, please do let me know if this is one of the solution)

 

I have also read that we can deploy the bot from one VM to another VM and it would work if we minimized the VM. i don’t actually understand this one so please elaborate me more on this if you understand about it as this seems to be the most simple one

 

 

Hi @David Jansen 

Please give a try on backscreen resolution, can you share the link where you have read about minimizing the vm?

hi @ChanduMohammad@Padmakumar , @Tamil Arasu10 

 

I have checked the unattended mode is not having any issue

 

And yes i do have black screen as the screenshot and read some article about it that suggest to run a batch file to dissconnect the rdp and lock/logoff (i have not try this but i am asumming this would work, please do let me know if this is one of the solution)

 

I have also read that we can deploy the bot from one VM to another VM and it would work if we minimized the VM. i don’t actually understand this one so please elaborate me more on this if you understand about it as this seems to be the most simple one

 

 

Hi @David Jansen 

Please give a try on backscreen resolution, can you share the link where you have read about minimizing the vm?

Hi @ChanduMohammad 

as far as i know the resolution should not be the issue since even we rescale the VM the bot still works fine, it might be me not catching what your are mentioning as i do not understand what is “backscreen resolution” 

as for the link i actually remember reading it from a long time ago, but it was someone’s reply to a question and it was at apeople that is as far as i know and should not be available anymore. So i’m afraid i can’t search for the link

Userlevel 5
Badge +9

Hi @David Jansen 

Checkout below link for black screen 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

Userlevel 7
Badge +12

Hi @David Jansen ,

 

Please follow either of the below mentioned step to fix the issue.

  • Logout through the Run prompt (Run→ Log-out)

or

  • Use the enclosed .bat file to properly log-out from the runner machine.

Note: There should not be any other active session on the runner machine during the Unattended Bot execution.

 

 

Userlevel 4
Badge +8

Hi @David Jansen ,

If you still facing the issue, check the follow KB article in order to discard the referenced issue 

https://apeople.automationanywhere.com/s/article/Insert-Keystrokes-Keystrokes-not-working-when-RDP-window-is-minimized

  1. Close all the Remote Desktop sessions opened on your computer (the parent machine).
  2. On the parent machine, click Start and select Run.
  3. In the Run dialog box, type "regedit" and press Enter, the Registry Editor opens.
  4. Locate any of the following Registry keys:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

(if you want to change the RDC settings for your user account)

– or —

  1. HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

(if you want to change the RDC settings for all accounts)

  1. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client

(if the machine is a 64-bit machine)
 

  1. Create a new DWORD value in this key named  RemoteDesktop_SuppressWhenMinimized and specify 2 as the value data.
  2. Reboot the parent machine (this is a mandatory requirement)

 

Regards.

HTH

Badge +7

Hi @David Jansen ,

If you still facing the issue, check the follow KB article in order to discard the referenced issue 

https://apeople.automationanywhere.com/s/article/Insert-Keystrokes-Keystrokes-not-working-when-RDP-window-is-minimized

  1. Close all the Remote Desktop sessions opened on your computer (the parent machine).
  2. On the parent machine, click Start and select Run.
  3. In the Run dialog box, type "regedit" and press Enter, the Registry Editor opens.
  4. Locate any of the following Registry keys:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

(if you want to change the RDC settings for your user account)

– or —

  1. HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

(if you want to change the RDC settings for all accounts)

  1. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client

(if the machine is a 64-bit machine)
 

  1. Create a new DWORD value in this key named  RemoteDesktop_SuppressWhenMinimized and specify 2 as the value data.
  2. Reboot the parent machine (this is a mandatory requirement)

 

Regards.

HTH

Hi @Raul Jaimes 

thanks for the suggestion, i’ve opened AA support ticket and they also gave this article for the solution, even though in the end the problem was apparently not because of the RDP getting minimized but this is for sure is the solution for the title i posted.

 

thank you for all the answer for this post

Userlevel 4
Badge +9

check attached documentation for this issue.

Reply