Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
not really. What you need to do is actually use a WaitChild or something to assign your test object in the first place. So, you would have
It's a matter of making sure that you check for the object before you try and use it... and if you're not sure it will exist, you need to first use a Wait or Find method to find it. Those methods return a "stub" object with Exists = false if the object returns empty. No other properties are included so you can't test for things like Visible or call methods like WaitChild if Exists = false.
var TestObj = sys.Process('MyApp').WaitChild('MyObject', 10000)
if TestObj.Exists then
var newObj = TestObj.WaitChild()It's a matter of making sure that you check for the object before you try and use it... and if you're not sure it will exist, you need to first use a Wait or Find method to find it. Those methods return a "stub" object with Exists = false if the object returns empty. No other properties are included so you can't test for things like Visible or call methods like WaitChild if Exists = false.