Forum Discussion
KB1
Champion Level 2
3 years ago- Declare a variable to track the elapsed time:
var elapsedTime = 0;
- Use a while loop to continuously check for the popup box until it appears or the elapsed time exceeds 45 minutes (45 * 60 * 1000 = 2700000):
while (elapsedTime < 2700000) {
// Check for the popup box
if (PopupBoxExists()) {
// Popup box has appeared, break out of the loop
break;
}
// Popup box has not appeared yet, delay for 1 minute (60 * 1000 = 60000)
Delay(60000);
elapsedTime += 60000;
}
- After the loop, you can check if the popup box appeared or not. If it did, you can continue with your test logic. If it did not appear within the allotted time, you can add some code to handle the timeout as needed.
Note: The PopupBoxExists() function should be replaced with your own code to check for the presence of the popup box. You can use various methods such as searching for specific UI elements or using TestComplete's built-in object recognition capabilities.
This is what I've used