Sure. Although the first step might simply be to purge the method from 
all of the examples.

Charley Baker wrote:
> We have to be able to deprecate methods. While it's not yet a language 
> feature, rubygems and other projects are deprecating apis: 
> http://tenderlovemaking.com/category/rubygems/
>
> -c
>
> On Fri, Apr 3, 2009 at 4:57 PM, Bret Pettichord <b...@pettichord.com 
> <mailto:b...@pettichord.com>> wrote:
>
>
>     I wish we'd never added that contains_text method.
>     browser.text.include?
>     does the same thing and helps you to start thinking in Ruby.
>
>     Bret
>
>     Chuck van der Linden wrote:
>     > Thanks guys, great responses...
>     >
>     > I think the include option will work best.  I was trying to use
>     > ".contains"  have to learn to better find my way around the docs to
>     > see what methods are supported for things.. using the wrong method
>     > name is just full of fail.
>     >
>     > browser.div(:id, 'legend').text.include?("Bob T. Lewis")  #worked
>     > great
>     >
>     > So that means I can end up using
>     > browser.div(:id, 'legend').text.include?("Bob T. Lewis").should ==
>     > true  in my cucumber step.
>     >
>     > and yes it's all green
>     >
>     >
>     >
>     > On Apr 3, 10:38 am, Tiffany Fodor <tcfo...@comcast.net
>     <mailto:tcfo...@comcast.net>> wrote:
>     >
>     >> Hey Chuck!
>     >>
>     >> Does this work?
>     >>
>     >> browser.div(:id, 'legend').value.include?('username')
>     >>
>     >> -Tiffany
>     >>
>     >> On Apr 3, 11:27 am, Chuck van der Linden <sqa...@gmail.com
>     <mailto:sqa...@gmail.com>> wrote:
>     >>
>     >>
>     >>
>     >>
>     >>> I want to make sure that the correct user has been logged in
>     >>>
>     >>> The user's name appears in a legend div a the top of the page,
>     along
>     >>> with some other links for things like changing the password, etc.
>     >>>
>     >>> Is there a ready-made method like this similar to '.contains_text'
>     >>> that can be used on a div?
>     >>>
>     >>> browser.div(:id, 'legend').text  returns the entire text..  do
>     I need
>     >>> to devolve to ruby string handling at this point?
>     >>>
>     >>> (for someone with stronger ruby skills the answer to this is
>     probably
>     >>> elementary)- Hide quoted text -
>     >>>
>     >> - Show quoted text -
>     >>
>     > >
>     >
>
>
>     --
>     Bret Pettichord
>     CTO, WatirCraft LLC, www.watircraft.com <http://www.watircraft.com>
>     Lead Developer, Watir, www.watir.com <http://www.watir.com>
>     Blog, www.io.com/~wazmo/blog <http://www.io.com/%7Ewazmo/blog>
>     Twitter, www.twitter.com/bpettichord
>     <http://www.twitter.com/bpettichord>
>
>     Watir Training: Portland/Beaverton April 16-17
>     www.watircraft.com/training <http://www.watircraft.com/training>
>
>
>
>
>
> >


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


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