How to handle UnexpectedWindow/Overlapping window using the script or General Events?
Hi All,
My application throws popup for every 3-5 Min. Script can proceed further by clicking on Ok button in the popup.
But how to recognise this popup using testcomplete dynamically?
Ex: While running the script, In middle if any popup appears TestComplete is not triggering it as UnexpectedWindow/Overlapping window. So that the webpage objects are going to "VisibleOnScreen=False" due to this popup. If objects are in Invisible state, we can't proceed further.
Please find the screen shot of the unwanted popup in the application and also Let me know if your require any other details in this regard.
Regards,
BommaReddy
Hi All,
As a workaround, I got the better solution to handle Windowless popup(Model Based popup)
By using Timer Object we can overcome this problem. Write the following code in event handlers.
OnStartTest:
Sub OnStartTest(Sender) Dim MyTimer Set MyTimer = Utils.Timers.Add(8000, "unit1.TimerRoutine", True) MyTimer.Name = "ModelPopUp" Log.Message "Timer ON" End Sub
OnStopTest:
Sub OnStopTest(Sender) Utils.Timers.Items("ModelPopUp").Enabled = False Log.Message "Timer OFF" End Sub
unit1.TimerRoutine:
Function TimerRoutine 'write the code to check whether popup exists or Not If popup=True Then 'close popup (or) Click End If End Function
Before script starts, the controller will go to OnStartTest and activate Timer Object. Once Timer triggers, TestComplete pauses the test to run the timer’s routine. The test is resumed after the timer routine has finished running.
So for every 8sec, i am checking whether Windowless popup(Model Based popup) exists or not. For more details on Timer object click here
Regards,
BommaReddy