Thanks!  Looking up information on "should" is so hard since it's a
common English word.

I found an alternative solution in the meantime:

browser.text.include?("this is good text").should == false

And I was actually wanting to look for a regex string, so I ended up
using:

browser.text.match(/regex/).should == nil


On Apr 16, 4:03 pm, Alan Baird <alan.ba...@riskmetrics.com> wrote:
> You were soooo close:
>
> browser.text.should_not include('this is good text')
>
> -----Original Message-----
> From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
> On Behalf Of James
> Sent: Thursday, April 16, 2009 3:00 PM
> To: Watir General
> Subject: [wtr-general] opposite of "should"
>
> If I'm looking to see that text is on a page I can have:
>
> browser.text.should include('this is good text')
>
> What if I want to make sure the page -doesn't- have the text?  I'm not
> sure how to reverse the should method so it's more of a "should not"
> method.
--~--~---------~--~----~------------~-------~--~----~
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