I found you have to use Watir::Wait.until instead of Watir::Wait.wait_until, 
maybe it's a type in the code?

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Jarmo Pertman
Sent: Friday, November 19, 2010 12:44 PM
To: Watir General
Subject: [wtr-general] Re: Converting Watir::Waiter.wait_until to 
element.wait_until

Hi!

First, please note that #wait_until_present is not the same as
wait_until #exists? because #present? does mean that the link has to
#exist? AND has to be #visible?. But i guess that doesn't matter most
of the time.

Depending of what you're doing with that link later on i'd recommend
even easier way of using #when_present:
$browser.link(:i, checkNode).when_present.click # or whatever you're
going to do when the link exists and is visible...

The second one would be:
Watir::Wait.wait_until {{$browser.image(:id, nodeID[i][0]).src !=
"images/wait18.gif"}

So, the most easiest "fix" to hide all deprecation warnings would do
one global search & replace of "Watir::Waiter" to "Watir::Wait" and
you're done. Those #when_present, #wait_until_present and
#wait_while_present methods are added just for convenience.

Jarmo Pertman
-----
IT does really matter - http://www.itreallymatters.net


On Nov 19, 7:34 am, Alastair Montgomery <[email protected]> wrote:
> Hi,
>
> I've just updated the Watir install at our Indian site to 1.6.7 and
> started seeing the messages about Watir::Waiter being deprecated.
>
> I've been able to convert the following format lines from
>     Watir::Waiter.wait_until {$browser.link(:id,checkNode).exists?}
> to
>     $browser.link(:id,checkNode).wait_until_present
>
> But my brain is drawing a blank with this line,
>     Watir::Waiter.wait_until {$browser.image(:id, nodeID[i][0]).src !=
> "images/wait18.gif"}
>
> I couldn't find the new methods on the API docs, maybe it is the jet
> lag catching up on me.
>
> Can you point me at examples or how the above line checking the image
> source URL would work in the new format?
>
> Thank you.
> Alastair

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to