Hi,
    try using the getContents to find the text.
 var = table[1][1].getContents
puts var

As far not finding the cell means (normally)that you
are accessing the wrong table with wrong arguments.
A long way to get around is to try each table index
and then locate what you are looking for.
hope this helps.
AD

--- Amitha Shetty <[EMAIL PROTECTED]> wrote:

> Dynamic tables are hidden and shown when a
> particular item is added to the pane.
>  I got the table index and also the table has 9 rows
> and 1 column.
> When I try to access table[1][1](and search for a
> text there), It throws the following exception:
>  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2606:in
> > `[]': Unable to locate a cell at index 1
> > (Watir::Exception::UnknownCellException).
> > 
> What I want to do is look for the text in the row
> only if that row exists.But exists? function did not
> work for a row...How else can I do it?
> 
> "Cain, Mark" <[EMAIL PROTECTED]> wrote:
> v\:* {behavior:url(#default#VML);}o\:*
> {behavior:url(#default#VML);}w\:*
> {behavior:url(#default#VML);}.shape
>
{behavior:url(#default#VML);}st1\:*{behavior:url(#default#ieooui)
> }
> What I had to do was do a view source on the page
> and find the desired table using IE’s find function
> (searched for <table).  Starting at the top of the
> page I would count the number of tables (using find
> next) until I got to the desired table—the count
> number being the index of that table (I believe
> tables are zero based indexes so keep that in mind).
>  Once there I could do any number of things to that
> table.  
> 
>  
> 
> Are the dynamic tables already in the page hidden
> and shown or are they added based on user input?
> 
>  
> 
> --Mark
> 
> 
> ---------------------------------
> 
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Amitha Shetty
> Sent: Monday, October 17, 2005 12:34 AM
> To: [email protected]
> Subject: [Wtr-general] How to check if a particular
> row exists in a table?
> 
> 
>  
> 
>  
> 
>  
> 
> Hi,
> 
> 
>   How to check if a particular row exists in a
> table?
> 
> 
> 
> There are more than one table in the screen to use
> 
> 
>  $ie.row(:id, 'row1').exists?.
> 
> 
>  Also there are tables within a table and also
> tables are dynamic.
> 
> 
> When I try  table[x][y].exists? I get an error which
> says:
> 
> 
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2606:in
> `[]': Unable to locate a cell at index 1
> (Watir::Exception::UnknownCellException).
> 
> 
>  
> 
> 
> How do I test this?
> 
> 
>  
> 
> 
> Thanks,
> 
> 
> Amitha
> 
> 
>  
> 
> 
> ---------------------------------
> 
> 
> Yahoo! India Matrimony: Find your partner now.
> 
> 
> ---------------------------------
> 
> 
> Yahoo! India Matrimony: Find your partner now.
> 
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 
>               
> ---------------------------------
>  Yahoo! India Matrimony: Find your partner now.>
_______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


No Body Has ever Collided With The Sky...So Sky Is The Limit!


                
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to