Forum Discussion

anik_cadieux's avatar
anik_cadieux
Contributor
11 years ago
Solved

Checking if a confirmation pop up box appears takes too long

I am using TestComplete 9.3 with scripts only.

While testing navigation pages in all browsers, I have a page that sometimes pops up the warning dialog box saying that I am leaving a secured https site for an unsecured http site. I wrote some code in JScript to manage this box:




if (Sys.Browser("*").Page("*").Confirm.Exists)



{



Sys.Browser("*").Page("*").Confirm.Button("OK").Click();



Sys.Browser("*").Page("*").Wait();

}



The code works fine when the popup appears, it clicks the OK button. But when the popup does NOT appear, this line of code takes a lot of time to execute itself. The top right corner shows "Waiting for "confirm"............" for at least 10 seconds.



Is there any other way to manage unexpected windows or to change the delay for which TestComplete waits for a confirmation window or popup appears ?


4 Replies