Forum Discussion

jose_pita's avatar
jose_pita
Super Contributor
11 years ago
Solved

GeneralEvents_OnUnexpectedWindow and GeneralEvents_OnOverlappingWindow

Hi There,



I have these 2 event handlers active:



GeneralEvents_OnOverlappingWindow and GeneralEvents_OnUnexpectedWindow.



Neither of them consider javascript errors in Internet explorer as a unexpected/overlapping window, TC continues running the tests until an object in unreachable... (see attached image)



I've been able to catch this popups by searching for it after each event posted on a log, but this slows down my testes considerably.



The problem with this popups is that, if I don't close it, TC keeps running until an object is not found and then the test stops, instead of just closing the popup and continue the test...



Anyone has a hint on how to make the event handlers work?



Thanks a million.
  • No, you won't need doing this explicitly, it will be done automatically every time when Timer function is invoked.

5 Replies

  • jose_pita's avatar
    jose_pita
    Super Contributor
    Gena,



    How's that aproach different from mine:



    "I've been able to catch this popups by searching for it after each event posted on a log, but this slows down my testes considerably."



    Don't I have to search for the popup between every action?




  • karkadil's avatar
    karkadil
    Valued Contributor
    No, you won't need doing this explicitly, it will be done automatically every time when Timer function is invoked.
  • jose_pita's avatar
    jose_pita
    Super Contributor
    Can you please give an example?



    I can't see how this is going to help me...



    My problem is that, when the popup error appears, some objects are still available to TC and the test continues until an error is logged,that's what I want to prevent, I can't see where I'll put this timer function.

  • karkadil's avatar
    karkadil
    Valued Contributor
    The example is provided by the link above.



    All you have to do is to write a function which checks whether the window exists and close it if it does (the KillCalculator function in the example).



    Then you need to add a timer (Utils.Timers.Add) in the beginning of the 1st test. After this, the function will be invoked every N milliseconds (N is provided as a parameter for timer).



    In general, it works similar to events.