Forum Discussion

squid-box's avatar
squid-box
New Contributor
14 years ago

Detecting window that is blocking focus from tested window?

Hi!



I'm currently writing tests for a Windows application which at random time intervals displays a nag-screen to non-registered users. This nag-screen blocks any attempts to gain focus to the main window (until a button or certain keyboard combination has been activated).



The problem I have is that when my tests are running, this window can show up at any given time (so it's very hard to add checks for it in the code), but it might not fire an UnexpectedWindow event, as it often doesn't cover what I'm trying to click. This happens 9 times out of 10.



Is there any way to detect this window without having to do a check before every action?





Best regards,

- Joel Ahlgren