Hello, Has anybody had an issue with sporadic fails for an overlapping window due to tooltips? For instance, the test will type something in to one textbox but then the mouse hovers there long en...
'Escape' will usually clear a tooltip without affecting anything else; that's what I've used in the cases where I expect a tooltip that will obstruct my next action. First check if the thing you want to interact with exists, and if it does, just move on; if not, press Esc, then try. For unpredictable cases that are all over the place, though, I'm not really sure of a good single-point solution to handle all cases.
- Generally, if there is an error, I want the test to fail and abort. If it's an error I want to work around, it tends to work better if I anticipate and catch / handle it before TestComplete notices, though admittedly I do sometimes wish it allowed me a little more control, there.
- Sometimes the 'default' on unexpected windows is 'Okay' or 'Yes', and that's not what I want, so I disable the 'Press Enter'. It can always be added back in case-by-case in your Event Handler.
Speaking of Events - Just to make sure you have it set up, you should in the 'Project Explorer' have a section under 'Advanced' called Events -> General Events, and in there, OnOverlappingWindow and OnUnexpectedWindow should have some functions assigned to them:
Then, you should have a file Advanced -> Script -> EVENTS, and in there, some defined functions with names matching the settings above that are to be executed when those events happen.
You might tack on at the very tops of those functions some kind of log action (I like Log.Warning; it gets your attention without disrupting the test) or external reporting, so that when they are unattended, you can at least know for sure if the events triggered. If they're happening but not resolving the problem, at least that narrows down the field you're looking in for a solution. If they're not triggering, you may have some other issues to deal with.
In that vein - something that I have noticed is that TestComplete seems not to 'notice' overlapping / unexpected windows until you force it to by trying to perform some action that the overlapping or unexpected window interferes with, such as a click. It has been useful for me in some cases to make sure my 'order of events' is to not assume I can act on a control until I've attempted some simple action, then allowed the Event Handler to run and / or done any 'intelligent' handling of possible problems.
Marsha- Unfortunately I do not have the option to turn off the tooltips. :(
jmassey- Wow, thanks for all of the info! I'm positive that the Event Handler is set up correctly, I have successfully implemented OnTimeout, OnStopTest, OnLogError, and OnLogWarning event handlers, all of which work beautifully.
I am using the exact method you suggested of posting a log warning within the event handler, this is how I know that the event handler is never being hit- the warning never posts to the log. I believe the code I have in the event handler would work if it was being hit, but its not. The next step is, as you mentioned, trying to communicate with the object that is overlapped. TestComplete knows it is being overlapped, but when I try to recreate in TestComplete it is always able to eventually get away from the tooltip (even when all of the project properties are set to false) but cannot through TestExecute(only sometimes).
I suppose from here I will just have to do a mass change to my tests to add the event handler and let it run overnight in the lab to see what happens.
Ah, darn. Well, if you work out a nifty solution, let me know. I could certainly see myself running into that kinda widespread problem as well down the line; we're just getting started actually making heavier use of TestExecute to run tests unattended.