Forum Discussion
tristaanogre
12 years agoEsteemed Contributor
Change your code to use the WaitProcess method (see documentation here).
something like this:
Essentially, methods like WaitProcess and other WaitNNN methods, will wait the specified timeout value for the object to be recognized by TestComplete. If it returns within that time, it will return the object itself. If it doesn't return within the time, it returns a "stub" object with the Exists property set to false.
This should be your methodology, actually, anytime you're doing an "exists" test.
something like this:
p = Sys.WaitProcess("program", 10000)
if (p.Exists){
p.Close()
}
Essentially, methods like WaitProcess and other WaitNNN methods, will wait the specified timeout value for the object to be recognized by TestComplete. If it returns within that time, it will return the object itself. If it doesn't return within the time, it returns a "stub" object with the Exists property set to false.
This should be your methodology, actually, anytime you're doing an "exists" test.
Related Content
- 6 months ago
- 6 years ago