anik_cadieux
12 years agoContributor
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:
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 ?
Try using WaitChild
WaitChild Method
http://support.smartbear.com/viewarticle/30737/
Checking Whether an Object Exists
http://support.smartbear.com/viewarticle/27721/