OnOverlappingWindow Event works, but error still occurs
So, the Warning log there happens at the start of my OnOverlappingWindow event. The Keyboard input is just pressing 'Esc' (the overlapping window in this case happens to be a tooltip, so this should work fine). It actually does clear the tooltip. Then that 'window was clicked with the left mouse button' is the test actually moving along successfully from the point where it was interrupted. Everything seems to be in order...except for some dang reason the Overlapping Window error still happens, and it kills my test. I don't want to disable Stop On Error, but when an error is handled correctly and I'm able to move on, why is it still making my test fail?
Here is the function in full that runs when that event happens. Everything in it seems to be functioning just fine:
def GeneralEvents_OnOverlappingWindow(Sender, Window, OverlappingWindow, LogParams): aqUtils.Delay(2500) Log.Warning('Overlapping Window') Log.Picture(Sys.Desktop.Picture(0, 0, -1, -1)) Sys.Keys('[Esc]') aqUtils.Delay(250) if OverlappingWindow.Exists: if OverlappingWindow.Visible and \ OverlappingWindow.VisibleOnScreen: if hasattr(OverlappingWindow, Minimize): Log.Warning('Attempting to minimize Overlapping Window') OverlappingWindow.Minimize() aqUtils.Delay(2500)