Forum Discussion

lleppert's avatar
lleppert
Contributor
9 years ago

Overlapping Window- tooltips

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 enough for a tooltip to appear, which then blocks the second textbox it is trying to type in.

 

The obvious solution is to remove the focus on the first textbox before moving to the second textbox, which does work when done to each individual test. However, my problem is that this is occurring intermittently in hundreds of our tests, rarely the same test(s) two nights in a row, and I am trying to come up with a solution that can be applied to all tests, such as an OverlappingWindow Event handler. I'm having little success with this because I'm having trouble recreating and getting it to hit my event handler code. 

 

My question is, has anybody else had a similar issue and would be willing to share how they corrected the issue? Any suggestions or advice?

 

Thanks,

Lauren

8 Replies

  • '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.

    • lleppert's avatar
      lleppert
      Contributor

      Thanks jmassey. If I can figure out how to get my event handler to be called, I will definitely try using escape. 

      • jmassey's avatar
        jmassey
        Contributor

        Okay, so a few more thoughts:

         

         

        Here is how I have my Playback settings.

        - 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.

  • NisHera's avatar
    NisHera
    Valued Contributor

    How did you set up project play back parameters?

    • lleppert's avatar
      lleppert
      Contributor

      Hi, 

       

      Thanks for your response.

       

      At first I had my playback properties set up exactly the way that you do in your screenshot. I then figured that one of these settings was preventing my event handler from being hit, so I turned off the all of the settings(set to false) for both unexpected window and overlappning window. Did not make a difference. Whenever I try to play back in TestComplete it spins for a while and says 'Waiting until overlapped window becomes visible' but then eventually is able to move on without errors. However, we are getting errors occasionally when the test runs through TestExecute in our lab overnight.

       

      Also, I have tried both an OnOverlappingWindow and OnUnexectedWindow event handler, neither of which are being hit by TestComplete while it is spinning and 'Waiting until overlapped window becomes visible'.

       

       

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    I had a similar issue and it turned out we have a setting in our software that will turn off the tooltips.  If I'm not checking them explicitly, I just keep them off.