Forum Discussion

LordXane's avatar
LordXane
New Contributor
14 years ago

How do I reduce the property wait time?

I can explain more if someone would like, but basically I wan't to wait only 1 second for the exists property of an object, without changing the default auto wait

Aliases.MyObjectName.ChildObject.Exists //wait's but for 10 seconds

Aliases.MyObjectName.WaitAliasChild("ChildObject", 1000) //waits for 1 second correctly, but logs an error if it's not found, and it's not the critical part of the test. 



Is there any way to wait a shorter time on a property without changing the default wait time, and without throwing an error when the object isn't found? (I also wouldn't want to change the default setting to log an error if the object isn't found)



Thanks for your time!
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Aliases.MyObjectName.WaitAliasChild("ChildObject", 1000) //waits for 1 second correctly, but logs an error if it's not found, and it's not the critical part of the test.




    This statement should not return an error unless the object indicated by MyObjectName doesn't actually have a child object in the Alias tree called "ChildObject".  So, this is actually the correct code to do what you want it to do, however, you need to make sure that your Aliases tree matches what you're looking for.



    If ChildObject is not a direct child of MyObjectName but you still want to find it, you can use "FindChild" to search the tree to locate it, giving a set of properties and values for the search.
  • LordXane's avatar
    LordXane
    New Contributor
    Hmm you're right. I tried again and it's working. I must have had the syntax wrong or something, and assumed I knew what the error was without reading the whole thing haha. Sorry! Thanks for responding!