If Z's approach below doesn't work (first thing I would have
suggested) you could also try something along these lines (especially
the first one if you know that a single cell should contain just that
text and nothing more)

 if browser.table(:id, "dataTableBody").cell(:text, "146173").exists?
or
  if browser.table(:id, "dataTableBody").row(:text, /146173/).exists?

On Sep 15, 1:02 am, Željko Filipin <[email protected]>
wrote:
> On Tue, Sep 14, 2010 at 9:58 PM, Watir General <[email protected]> wrote:
> > 9    if browser.table(:id, "dataTableBody").include?("146173")
> > NoMethodError: undefined method `include?' for
> > #<Watir::Container::Table:0x1010e1710>
>
> You are calling "include?" method on a table object, and Ruby complains. You
> should call the method on table text (or html).
>
> Example (not tested):
>
> browser.table(:id, "dataTableBody").text.include?("146173")
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to