How To Set Auto-Wait Time Out More Than 1,000,000ms
Hi all,
I have some test cases which required to set the auto-wait time out more than 1,000,000 ms and I found that 1,000,000 is the maximum time out can be set.
Is there any possible method to achieve this?
I found this topic, Default Auto Wait time out can be set max to 1000000ms but I will get the error: Cannot obtain the window with the window class <....>. See Details for additional information. Details: The window with the specified attributes does not exist.
The TestComplete will not enter the while loop since it cant find the object yet, because I'm still waiting for it and that's the purpose why I'm using time out.
var LoopCount = 0
while (!Object.Exists) and (LoopCount < 30) do
{
Delay(60000);
LoopCount++;
}
The example code below will wait until Edge Tab is opened or until time limit is reached i.e. 17 minutes (1020000 seconds)
function Wait() { var timer = 0; var then = aqDateTime.Now(); var now = then; while ((now - then) < 1020000 && !Sys.Browser("edge").WaitChild("Page(\"edge://newtab/\")", 1000).Exists) { timer++; now = aqDateTime.Now(); } Log.Message(`Waited ${timer} seconds`); }
It will not throw an error if it can't find the object (base on the Object Browser)