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

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

On Apr 16, 4:03 pm, Alan Baird <> wrote:
> You were soooo close:
> browser.text.should_not include('this is good text')
> -----Original Message-----
> From: [] 
> 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
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to