Hi,
We facing a situation that the system (windows 10) gets locked after certain duration. Because of which the process using accessibility element fails without finding the foreground window (I assume that screen lock is cause of this issue in this case).
Could anyone please suggest how to avoid the screen lock when the process in running in windows 10 (It is already put on Never for display off and sleep mode).
Advance thanks.
Regards
Uvi
Hi Uvi - the recommendation is to get IT to disable it completely. In the short term you can create an object that attaches to explorer.exe (Windows desktop) and do things like open and close the Start menu to keep the desktop active. But that's quite a nasty fix and it's better in the long term to get the screen lock/saver disabled.
You can also catch any exceptions and check if the screen is locked using the Login Agent. If the screen is locked you can run the Login action and continue your Process, if it is not locked, continue throwing the error.