I'm not sure just exist is enough for what I'm talking about.

If I have a span that already exists in the document and I do something that 
causes an async request/update to the server then the span always exists so 
saying:

span(:id, ...).wait_for_exists?

may blow right through without pausing because the span is there.

Maybe something like

span(:id, ...).wait_for_change('text', 'blah')

where 'text' is the attribute i'm waiting to change and 'blah' is the value 
I'm waiting for it to change to.

So you could also do

span(:id, ...).wait_for_change('exists?', true)

-andy

----Original Message Follows----
From: "Bret Pettichord" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Wtr-general] Wait for control to exist
Date: Tue, 13 Jun 2006 13:23:40 -0500

On 6/13/06, Andy Sipe <[EMAIL PROTECTED]> wrote:
>
>What would be nice would be something like this:
>
>@ie.wait(10) {
>   button(:id, 'btnOne)
>   span(:id, 'blah')
>}


This would be:

wait_until(10) {
  @ie.button(:id, 'btnOne').exists? and
  @ie.span(:id, 'blah').exists?
}


>Also, is it enough to just check that the item exists?  Often I have items
>that are being updated via AJAX style code and they exist, but they are
>changing, so I'm looking to see if the value is something specific or
>something different than last time.   If I had the polling on exist it
>wouldn't be enough.


This approach would allow you to check for whatever you wanted.


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to