Forum Discussion

i404's avatar
i404
Contributor
13 years ago

How to use wait

Hi Guys,



I am having trouble with an click action which I can only perform when the first page after login is fully loaded (it has a few jscript charts and take a while to render).



I am using the script approach where I find the object first, then I perform the action (in this case Click). The trouble it that I found my object and can be click it (its a Panel) but it would not do anything until the charts are fully loaded.



What is the best way I can do it? I have tried using:



set page = Aliases.iexplore

set obj = page.WaitPanel("troubleshoot", 2000)

If obj.Exists then

  obj.Click()

End if



Result: the panel was clicked but because the charts are not fully rendered before obj.Click get called, it does not take us to the troubleshoot page.



Any clue?



TIA



Regards

Ian

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    WaitPanel only ways until the object is present or the timeout is reached.  It does not necessarily wait for the panel to be fully rendered or for all background processes to complete.



    Once the panel exists, your next step is to figure out what indicators/properties of the panel need to reach a specific state before you execute the click.  Perhaps a "WaitProperty" call on the panel once you figure that part out.