To access row inside a table

P

Pranjal Jain

Hi
I am having a doubt regarding the basic ruby.

I want to access the row 7 in the table 9 of a web page. If I am trying
to access table only I am not facing any problem(i.e)

$ie.table:)id =>"", :index =>9).flash(20)

But if I am trying to access a row inside a table, it gives me error.
The command I used is as follows:

$ie.table:)id =>"", :index =>9).row:)value => "",:index => 7).flash(20)

The error I get is as follows:
Loaded suite temporary
Started

Web page opened successfully
E
Finished in 15.852 seconds.

1) Error:
test_b(TestCase):
NoMethodError: private method `row' called for #<Watir::Table:0x2dff1f4>
temporary.rb:88:in `test_b'

2 tests, 0 assertions, 0 failures, 1 errors

Can anyone suggest how to overcome this problem ?
Thanks in advance.
 
C

Christopher Dicely

Hi
I am having a doubt regarding the basic ruby.

I want to access the row 7 in the table 9 of a web page. If I am trying
to access table only I am not facing any problem(i.e)

$ie.table:)id =>"", :index =>9).flash(20)

But if I am trying to access a row inside a table, it gives me error.
The command I used is as follows:

$ie.table:)id =>"", :index =>9).row:)value => "",:index => 7).flash(20)

The error I get is as follows:
Loaded suite temporary
Started

Web page opened successfully
.E
Finished in 15.852 seconds.

1) Error:
test_b(TestCase):
NoMethodError: private method `row' called for #<Watir::Table:0x2dff1f4>
temporary.rb:88:in `test_b'

2 tests, 0 assertions, 0 failures, 1 errors

Can anyone suggest how to overcome this problem ?
Thanks in advance.


I've never used Watir, but the rdocs for Watir::Table seem to suggest that
what you need to do is something like this, if $ie.table(id=>"", :index=>9) is
getting the table you want:

$ie.table:)id =>"", :index =>9)[7].flash(20)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top