I have a test that launches an app and verifies it has launched through calls to GetForegroundWindow(). The test is run on a remote machine that we usually access through remote desktop. When we have a rdp session open to the machine, the test completes and all is well. However, once we close the remote desktop, the test fails because GetForegroundWindow is always returning Null. I've checked that the active desktop after I disconnect is still 'Default', so I'm sure I am not running into this issue. Any ideas what might be causing this?
Thanks in advance