The only thing that changed in this case was that

   <false> is not true

became

   <nil> is not true.

On Jan 23, 9:05 am, Bret Pettichord <b...@pettichord.com> wrote:
> I'm not sure if contains_text returns false or nil when fails to find a
> match. Try this instead:
>
> if assert(ie.contains_text("FOO"))
>
>
>
> Monkeybuns wrote:
> > The following code returns "FOO not found" even though
> > "FOO" is present in the output of ie.show_all_objects:
>
> >    ie = Watir::IE.attach(:title,"FooBar Report")
> >    ie.show_all_objects
> >    if assert(ie.contains_text("FOO") != nil)
> >      puts "FOO found"
> >    else
> >      puts "FOO not found"
> >    end
>
> > Seems to me like this should work, though I'm very new
> > to Watir.  I get the following result:
>
> > C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:48:in `assert_block':
> > <false> is not true. (Test::Unit::AssertionFailedError)
> >    from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:500:in
> > `_wrap_assertion'
> >    from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:46:in
> > `assert_block'
> >    from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:63:in `assert'
> >    from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:495:in
> > `_wrap_assertion'
> >    from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:61:in `assert'
>
> > Any wisdom?- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to