For Citrix automation the Ui element has to be visible in the foreground to the robot.
It’s not possible to do as an unattended automation. It will come under attended automation only.
It will throw the exception that Ui element not found if we lock the desktop or come out of the RDP.