so my example was kind of incomplete. I really only meant it as an example. Try
this instead.
def link_there?
link_text = "Click Me"
return @ie.link(:text , link_text).exists?
end
@ie=Watir::IE.attach('www.google.com')
while 1 # add something here to stop infinite loop
if link_there?
@ie.link(:text , link_text).click?
else
@ie.link(:text , "Next").click
end
end
----- Original Message -----
From: Nicola Kennedy <[EMAIL PROTECTED]>
Date: Wednesday, April 4, 2007 3:59 am
Subject: Re: [Wtr-general] Using Until
> I have tried the advice given by Paul (Thankyou) but am now
> receiving an error message when I run:
>
> 1) Error:
> test_recorded(TC_recorded):
> NoMethodError: undefined method `link' for nil:NilClass
> testnic26.rb:30:in `link_there?'
> testnic26.rb:35:in `test_recorded'
>
> 1 tests, 0 assertions, 0 failures, 1 errors
> >Exit code: 0
>
>
> Please advise??
>
> TIA
> _______________________________________________
> 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