To access row inside a table

Discussion in 'Ruby' started by Pranjal Jain, Apr 3, 2008.

  1. Pranjal Jain

    Pranjal Jain Guest

    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.
     
    Pranjal Jain, Apr 3, 2008
    #1
    1. Advertisements


  2. 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)
     
    Christopher Dicely, Apr 3, 2008
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...