Thanks for your reply Dan.. Actually the scripts were written on watir 1.x 
and later on we upgraded to watir 2.0.4, so most of my scripts make use of 
the wait_for_pageload method. So it would be good if I can get this working 
as it will save me from updating each script.
The when_present method works fine for an ajax element. But in my case the 
screen refreshes quite a number of times in between until the template link 
is generated. Though the link gets displayed I get the Timeout exception 
when I make use of the when_present method..

Watir::Wait::TimeoutError: timed out after 60 seconds
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-2.0.4/lib/watir/wait.rb:23:in 
`u
ntil'
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-2.0.4/lib/watir/element_extensio
ns.rb:19:in `method_missing'
        from (irb):47
        from :0

And I even tried the Watir::Wait.until method. But even that doesn't seem 
to work for me and throws the below exception.

Watir::Exception::UnknownObjectException: Unable to locate element, using 
:text, "Coversheet"
"
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/element.rb:78:in 
`asse
rt_exists'
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/element.rb:167:in 
`par
ent'
        from (irb):42
        from 
C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-2.0.4/lib/watir/wait.rb:18:in 
`u
ntil'
        from (irb):42
        from ♥:0

On Wednesday, 29 January 2014 06:07:21 UTC+5:30, Dan wrote:
>
> My question would be why simply using one of the wait methods like 
> when_present isn't working for you?

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to