How do I defeat random popups?

I have a strange issue that i cannot figure out how to get around.

My SUT has “Always on top” popup windows (reminders) that appear on the screen at random and unpredictable times. They invariably have the unfortunate effect of covering up other elements on the screen and cause my scripts to fail.

This little chunk of code closes one of those popups with no problem, but because these popups appear randomly I cannot simply insert it it into a defined point of my script?

if ImageFound(“Random_Message”)
Click “Button_OK”
End if

Any ideas?

Thanks in advance!


Eggplant has a built-in script called Omega13 that was designed just for this purpose. In the Ad-Hoc Do Box (the field at the bottom of the Run window), type “Omega13” and the instructions for how to use it will be displayed in the log view.

This is the exact situation that we designed the Omega13 module for. It doesn’t appear to have made it into the general documentation, but if you look in the release notes for “Omega13” or type that string into the “Do” box at the bottom of the run window you can find some information on how it works. Basically, when a script is about to fail because an image wasn’t found, the Omega13 will call a script (that you have to create) that will do things like check for popup windows and close them, then the Omega13 will try to execute the failing command again and pass control back to your script.

Thank you!!