# To access row inside a table

**URL:** <https://www.ruby-forum.com/t/to-access-row-inside-a-table/133764>\
**Category:** Ruby\
**Created:** [April 3, 2008, 11:07am UTC](https://www.ruby-forum.com/t/to-access-row-inside-a-table/133764 "2008-04-03T11:07:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranjal\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ac91a4/32.png) [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Post date:** [April 3, 2008, 11:07am UTC](https://www.ruby-forum.com/t/to-access-row-inside-a-table/133764/1 "2008-04-03T11:07:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pranjal\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ac91a4/32.png) [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Post date:** [April 3, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/to-access-row-inside-a-table/133764/2 "2008-04-03T15:31:44Z")

</div>

On Thu, Apr 3, 2008 at 2:07 AM, Pranjal J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

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