cancel
Showing results for 
Search instead for 
Did you mean: 

Surface automation(using Region Spy Mode) fails when runtime resource(VM) window is closed

ShwetaPandey
Level 2
Hi Experts, This is first time we have implemented RPA to mimic a process which uses an application running in external Citrix client. We used surface automation (Region Spy Mode) for the interaction with this application. RPA development is complete for the entire application process and we are currently in our testing phase. Our RPA process seamlessly runs in our runtime resource virtual machine(VM in DEV environment) when the VM window is OPEN. The moment we close this runtime VM window at any point in time while the RPA is running for this process, it fails.  Is there any limitation with surface automation to keep runtime resource VM window OPEN?  Any guidance would be appreciated as this is urgent for us to resolve.  Thanks, Shweta Pandey  
4 REPLIES 4

RohiniPatil1
Level 3
Hi Shweta, Even I'm facing same issue. When I run it in attended mode it runs without any issue but when I run in unattended mode, it gives different output. I'm working on Citrix application. How do you resolve this issue? Can you please help me?  Thanks & regards, Rohini

John__Carter
Staff
Staff
Are you accessing the resource machine via RDP (mstsc)? RDP is not a suitable access tool and is specifically not recommended by BP. The reason RDP doesn't work with surface automation is that the remote desktop only exists when you have the window open, and is destroyed once the window is closed. After closing the window BP is still running on the remote machine, but there is no UI, so any process that requires the UI (global click, keystroke, screenshot, SA) will encounter problems. You can test this by running a process that captures a screenshot - when the window is closed the screenshot will be black. One solution is to use a remote access tool where the target machine persists, and is unaffected by you viewing it (see link above). Another solution is to use Login Agent to log in and to run the process unattended. And if you do connect via RDP, you must run the Log Out and Log In processes to reinstate the remote desktop.

ShwetaPandey
Level 2
Thank you John for the response! We are not using RDP. Instead, using Radmin to access our virtual machines. With Radmin, our target runtime virtual machines persists. UI interactions such as global clicks, keystroke, etc works as expected if not used for 'Region Spy Mode' elements. It is currently failing only for surface automations and only when the runtime resource (unattended) window is closed. Process works fine when the window is open and/or minimized. I am wondering if there are any limitations with Radmin for surface automation.

ArshuHansda
Level 4
Are you using images to check the window exists or not? If yes, and if you want to use the same code in Unattended mode, it won't work. You have to take screenshots in unattended mode and then use that pictures for ""Image Search - Business object"". The resolution of the VM in unattended mode is fixed, so images and their grey scales change accordingly, that why it doesn't get the same grey scale or color scale as in the attended mode, (when VM is ""open).  Thanks, Arshu