Ask a Question

TestComplete on Unexpected Window handler not working

ddguy
Occasional Contributor

TestComplete on Unexpected Window handler not working

Hi there,

 

We have a large java swing based application with many modal pop ups and windows. In our project properties -> playback, under "On Unexpected window" I have enabled the checkboxes that press 'esc', 'enter', 'send the close command', and 'click on focused control'. However this has never worked (even since TestComplete 😎 when we encounter unexpected windows from our application. I am wondering if those modals/windows that show up unexpectedly during the test are not considered an "unexpected" windows to TestComplete, since it is still part of our application.


If that is the case, we would have to write specific handlers depending on which modal/window exists (ex: if (Aliases.blah.exists(1000) do....) which would be very slow and unnacceptable.

Is there a way to define which windows would be "unexpected" or some other alternative solution?

Thanks,

Dan

11 REPLIES 11
AlexKaras
Champion Level 3

Hi Dan,

 

Soungs strange...

One more guess: can you double check that the event handling routine in your test project is properly linked to the event?

https://support.smartbear.com/testcomplete/docs/ver-14-4-beta/testing-with/advanced/handling-events/...

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
ddguy
Occasional Contributor

Hi Alex,

 

Yes we have an unexpected window event set up, which is connected to a method in a file which I have tested and certainly does work however now I am wondering what the priority of that custom handler is. Does TC first try the default handler then the custom unexpected event handler? It seems like it skips the default handler and enters the custom unexpected window handler.

Also I have heard from other discussion on this board that anything that has to do with the expected application will never be an unexpected window, only truly unexpected windows such as a windows update or such. Is this true?

 

Thanks,

Dan

cancel
Showing results for 
Search instead for 
Did you mean: