Hi Matt,

 You need to access the cell, the onclick event is attached to the cell,
not the row. This should work:

$ie.table(:id,'table1')[1][1].fire_event('onClick')

table with id of table1, first row, first cell.

-Charley

On 7/6/07, Matt Berney <[EMAIL PROTECTED]> wrote:

I have been using Ruby and watir for a while now.  But, the set of web
pages has me stumped.  Any help you can provide is extremely appreciated.

In the source code below, there is a table of items that, when clicked,
fills in a frame.  I can get to the TableRow.  But, click on it or
fire_event('onClick') doesn't seem to do the trick. The flash method doesn't
light up.  However, flashing the entire table seems to work.  So apparently,
I am not selecting the item I want.

# this works
$ie.table(:id,'table1').flash

# this doesn't work
$ie.table(:id,'table1')[1].flash
$ie.table(:id,'table1')[1].click
$ie.table(:id,'table1')[1].fire_event('onClick')

How does one call the changlframes() javascript function?  I thought that
is what the fire_event() was for.  BTW, if it makes any difference, this
table is inside a <div>.

Thanks in advance.

<table id="table1" style="BORDER-COLLAPSE: collapse" borderColor="#819cb9"
height="180" cellPadding="0" width="69" border="1">
        <tr>
                <td id="list1" style="CURSOR: pointer"
onClick="changeBG('list1');changIframes(0);" bgColor="#ceddf0" height="30">
                        <p style="TEXT-ALIGN: center"><b>Ticket<br>
Info</b></p>
                </td>
        </tr>
    ...
        <tr>
                <td id="list5" style="CURSOR: pointer"
onClick="changeBG('list5');changIframes(4);" bgColor="#ceddf0" height="30">
                        <p style="TEXT-ALIGN: center"><b>SVAs</b></p>
                </td>
        </tr>
</table>
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to