Forum Discussion

scherer_95's avatar
12 years ago

Interrupt function in a new window

Hello.




I started to use TestComplete 3 months ago. I use a DelphiScript for write the tests.


In C (my last language) I could call a interrupt function when a event occurred. How can I call a interrupt function when a new window open in the test? I will catch de informations of the window who opened to save in a database.


 


If I wrote anything wrong, sorry. I'm improving my english.



Thanks.

1 Reply

  • Add GeneralEvents as OnUnexpectedWindow (read Help) and discribe in it what parameters you neeed to get. I use like this (VBScript):




    Sub GeneralEvents_OnUnexpectedWindow (Sender, Window, LogParams)


     


        LogParams.Locked = true 


        


        if Window.Name = "WinFormsObject(""MarqueeProgressBarForm"")" then


            aqUtils.Delay 5000

        ifelse Window.WndCaption = "Error" then

            Window.Close

     


    ...........



        End If



    End Sub