For this:

require 'rubygems'
require 'safariwatir'
browser = Watir::Safari.new
browser.goto("http://www.hurricaneaquasports.com/santee-100.html";)
puts browser.table(:id, "Table_01").methods.sort


Output:

==
===
=~
[]
__id__
__send__
blank?
class
clone
column_count
display
dup
each
enum_for
eql?
equal?
extend
freeze
frozen?
hash
how
id
inspect
instance_eval
instance_exec
instance_of?
instance_variable_defined?
instance_variable_get
instance_variable_set
instance_variables
is_a?
kind_of?
method
methods
nil?
object_id
private_methods
protected_methods
public_methods
respond_to?
row_count
send
singleton_methods
tag
taint
tainted?
tap
to_a
to_enum
to_s
type
untaint
what



Everything else I get errors...


On Sep 15, 1:56 pm, Rajiv Nanduani <[email protected]>
wrote:
> hi do one thing just check this
>
> puts browser.table(:id, "Table_01").exists?
>
> wt is output ?
>
> then check methods
>
> puts browser.table(:id, "Table_01").methods.sort
>
> or
>
> check is table with in frame or not?
>  if yes
> then
>
> puts browser.frame(:id,"uridvalue").table(:id, "Table_01").text
>
>
>
> On Wed, Sep 15, 2010 at 11:18 PM, Watir General <[email protected]> wrote:
> > For those I get:
>
> > NoMethodError: undefined method ‘text’ for #<Watir::Container::Table:
> > 0x1010edec0>
> > at top level    in Test for Cell Data Kayaks.rb at line 6
>
> > NoMethodError: undefined method ‘html’ for #<Watir::Container::Table:
> > 0x1010edec0>
> > at top level    in Test for Cell Data Kayaks.rb at line 6
>
> > Thank you but still nothing. This is strange.... :/
>
> > On Sep 15, 1:31 pm, Rajiv Nanduani <[email protected]>
> > wrote:
> > > hi
> > > try this as Z suggested
>
> > > require 'rubygems'
> > > require 'safariwatir'
> > > browser = Watir::Safari.new
> > > browser.goto("http://www.hurricaneaquasports.com/santee-100.html";)
> > > if browser.table(:id, "Table_01").text.include?("33 lbs")
> > >  puts "Data Verify passed"
> > > else
> > >   puts "Data Verify FAILED. Ouch."
> > > end
>
> > > or
>
> > > require 'rubygems'
> > > require 'safariwatir'
> > > browser = Watir::Safari.new
> > > browser.goto("http://www.hurricaneaquasports.com/santee-100.html";)
> > > if browser.table(:id, "Table_01").html.include?("33 lbs")
> > >  puts "Data Verify passed"
> > > else
> > >   puts "Data Verify FAILED. Ouch."
> > >  end
>
> > > On Wed, Sep 15, 2010 at 10:52 PM, Watir General <[email protected]>
> > wrote:
> > > > I appreciate everyone's input! :) however I still get
> > > > NoMethodErrors...
>
> > > > I have a similar version of the script I'm trying to create here for
> > > > just some random website with table data:
>
> > > > require 'rubygems'
> > > > require 'safariwatir'
> > > > browser = Watir::Safari.new
> > > > browser.goto("http://www.hurricaneaquasports.com/santee-100.html";)
> > > > if browser.table(:id, "Table_01").cell(:text, "33 lbs").exists?
> > > >  puts "Data Verify passed"
> > > > else
> > > >   puts "Data Verify FAILED. Ouch."
> > > > end
>
> > > > When I run that I get this.....
> > > > _____________________________________
> > > > NoMethodError: undefined method ‘cell’ for #<Watir::Container::Table:
> > > > 0x1010ede48>
>
> > > > at top level    in Test for Cell Data.rb at line 6
> > > > _____________________________________
>
> > > > any thoughts?
>
> > > > On Sep 15, 11:41 am, Chuck van der Linden <[email protected]> wrote:
> > > > > 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 readhttp://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]<watir-general%[email protected]>
> > <watir-general%[email protected]<watir-general%[email protected]>
>
> > > --
> > > RAJIV KUMAR
>
> > > <http://rajivkumarnandvani.wordpress.com/>
> > > <http://learnqtphelp.blogspot.com/>
>
> > --
> > Before posting, please readhttp://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]<watir-general%[email protected]>
>
> --
> RAJIV KUMAR
>
> <http://rajivkumarnandvani.wordpress.com/>
> <http://learnqtphelp.blogspot.com/>

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