We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Am I writing my functions incorrectly? What is causing this? This is causing my tests to fail inconsistently. Thanks
Refer to Using WaitNNN Methods in https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-activation.html . There are existing methods which you can use, to wait for an object to exist and timeout after a number of seconds.
Delay and aqUtils.Delay methods work fine.Without seeing your actual code, it's difficult to provide help
As per https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/misc/delay.html Scripting Analogue section hints to https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqutils/delay.html method.
It should work as you have it; however, try using aqUtils.Delay(ms, Str)
I have created a new project to try it out and in a long loop, and it worked properly.
I tried the following variations:
1. Delay(100, "Message")
2. aqUtils.Delay(100, "Message")
3. import time
time.sleep(100)
Perhaps it is failing due to your project sequence of events or state, and that would be hard to fix. I suggest you try the same and use what ever works for you starting with a reboot.
Same thing is intermittently happening with aqUtils
Thanks for the recommendations, will update with aqUtils and see if the issue comes up
What exactly are you doing, and what's the coding?
I am trying to delay in the "except" of a try-except function. If an object is not found, wait 3 seconds and look for the object again.
Refer to Using WaitNNN Methods in https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-activation.html . There are existing methods which you can use, to wait for an object to exist and timeout after a number of seconds.
Delay and aqUtils.Delay methods work fine.Without seeing your actual code, it's difficult to provide help