Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on an automation script which has a few Windows-based apps as underlying apps. I am using FlaUI. It is working fine on the default desktop, but when I run my script in a new child virtual desktop without switching to it, it is failing, I think.

I think the UI elements are not visible on an inactive desktop. Can anyone please help me make UI automation work in an inactive desktop? Any suggestion will be helpful.

What I have tried:

I tested it in Windows 7 (creating child desktops using CreateDesktop API). I also tested it in a new virtual desktop feature in Win 10/11. But the result was the same.
Posted
Updated 24-Jan-22 4:58am
v2

1 solution

AFAIK, you can't. An inactive Desktop does not receive the input focus, and therefor automation of those controls cannot work.

I could be wrong...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900