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:

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

Reply via email to