I don't know if this is the best way but this routine works for me.
Just pass the list object and it won't come back until the data is
loaded or it times out.

def wait_for_count(object)
  x = 0
  count = 0
  until count > 0 or x > 50
    sleep(0.2)
    items = object.getAllContents()
    count = items.length()
    x += 1
  end
end

-George

On Jun 3, 3:35 am, Marlon <[email protected]> wrote:
> Hi,
>
> I'm having a problem with my script due to performance issue with the
> site. The application has a Listbox that populates to many data
> resulting to a poor load time. I already used wait_until but it didn't
> help because the objects were already loaded but the data it not. One
> solution I can think of is to wait until the data on the listbox is
> completely loaded then perform the next operation, but how can I do
> it?
>
> Thanks
> -Lon

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to