Solved
Forum Discussion
rushikesh
Contributor
Hi, I suppose that will set Timeout for entire project as 2 sec. I want 2 sec only when particular code is running, as rest all object will require more Timeout.
baxatob
7 years agoCommunity Hero
You can implement some checkObjectExists() method:
function checkObjectExists(object, timeout) { Options.Run.Timeout = timeout; if object.Exists { do_something(); } else { do_something_else(); } Options.Run.Timeout = 10000; }
- cunderw7 years agoCommunity Hero
IMO it would be much safer to use a WaitProperty so you're not adjusting the global wait.
function checkObjectExists(object, timeout) { if (!object.WaitProperty("Exists",true,timeout)) { do_something(); } else { do_something_else(); } }
Related Content
- 6 years agoSol
- 3 years agovaishalisaid