Desktop UI Automation using WinAppDriver and tried to run using task scheduler using user account
We have created a desktop UI automation using C#. We tried to run the .exe by using task scheduler on VM who have login access on the VM. We tried to run it through attended mode (When user is logged onto the VM) and it is working fine. Ran the task when "User is logged in" in task scheduler settings. In this case it is running fine. But when we try to run the application when user is not logged on the VM (Unattended mode). Ran the task when "User is logged in or not" in task scheduler settings. It is not working in this case and showing below error -
2022-05-30 12:06:43.9038|Error in OpenMicrosoftStore - Failed to locate opened application window with appId: Microsoft.WindowsStore_8wekyb3d8bbwe!App, and processId: 16124 2022-05-30 12:08:05.1919|Error in TestCase03 - An unknown error occurred in the remote end while processing the command.
Can we have anyway to run the UI automation when VM is in unattended mode?

I think the user needs to be logged in to have the monitor become active. When the job is ran is the screen active?
If screen is active, it is running. we want to run application when screen is not active (when we minimize VM login).
@chavandnyanu looks like this question has been asked multiple times recently. See my response on the other issue. Minimized is fine, but you will need to configure some registry settings in the Registry editor.
https://github.com/microsoft/WinAppDriver/issues/1726