Forum Discussion

asmatullah's avatar
asmatullah
Contributor
10 years ago
Solved

Unable to find object using WaitVCLObject() method

Hi ,



I am using ParentObject.WaitVCLObject("ChildObject",15000) method .

This method is not finding child object though it is available on screen and waiting for the given time .Sometime it does find the object and some time unable to do so .



Any workaround or Better solution  for this problem .



Regards,

Asmatullah Khan 
  • Have you tried increasing the time out from 15000 to 20000?  It could be that you're on the cusp of the timing for finding the object... if you increase the wait time out, it does not mean it will wait the full 20 seconds so it's pretty safe to bump that value up a good bit.

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Have you tried increasing the time out from 15000 to 20000?  It could be that you're on the cusp of the timing for finding the object... if you increase the wait time out, it does not mean it will wait the full 20 seconds so it's pretty safe to bump that value up a good bit.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi,


     


    What if you refresh the object tree before accessing the object?




    ParentObject.Refresh();


    ParentObject.WaitVCLObject("ChildObject",15000);