If you are trying to iterate through the rows, try this

  $ie.table(:id, "myGrid").rows.each do | row |

for the cells try

    row.cells.each do | cell |

as far as clicking on rows outside the checkboxes or links, I see
nothing that would make the 'row' sensitive to clicking.  However
there is an 'onclick' event defined for the entire table..  so you
might try clicking on that, or using fireEvent to fire the onclick
event against the table element.   The thing is that the html you
pasted into the message is for a table with the ID of  "macsearchres"
which doesn't match the table ID in the Watir code you provided is for
a table with ID 'myGrid' ?  potentially that could also be a part of
your issue

On May 24, 9:55 am, a b <[email protected]> wrote:
> Hi all,
>
> do you know if we have table body support for Firefox on watir?
> I  try to use that sample
> "
>
> $ie.table(:id, "myGrid").body(:index, 1).each do | row |
>   row.each do | cell |
>     ## todo: figure out if this contains a sort link
>     ## todo: click the link now, or save a reference for later?
>   end
> end
>
> "
>
> but on firefox nothing happen.
>
> I am into a complex scenario. I have an dynamic table body generated.
> First cell is all the time a check box, when i enable it i can delete that
> row.
> When I click anywhere else on the row a new frame is opened.
>
> Here is page code; also I've attached the file
>
> <div id="__bulletins">
>   <table id = "macsearchres" class = "mactable1"
> onclick="mac.searchjump(event,&quot;bulletin&quot;)"
> fields="checkbox:delete,date:mtime,name,sticky,last" id="macsearchres"
> class="mactable1">
>     <tbody>
>       <tr class="trh">
>         <td class="nojump">
>              <input type="checkbox" args="macsearchres" value="1"
> id="select_all" func="select_all" class="nojump macobsv" name="select_all">
>         </td>
>         <td string="date" class="macstring nojump"
> help="1">Date</td>
>         <td string="bulletin" class="macstring nojump"
> help="1">[bulletin]</td>
>         <td string="sticky" class="macstring nojump"
> help="1">Sticky</td>
>         <td string="last_post" class="macstring nojump" help="1">Last
> posted</td>
>     </tr>
>     <tr rowid="1" target="a" class="machover">
>         <td class="nojump">
>             <input type="checkbox" r="1" value="a" name="delete"
> class="nojump">
>         </td>
>         <td>Friday, May 13, 2011 10:38:19 AM</td>
>         <td>a</td>
>         <td>T</td>
>         <td></td>
>         </tr>
>     <tr rowid="2" target="1305814892" class="machover">
>         <td class="nojump">
>           <input type="checkbox" r="1" value="1305814892" name="delete"
> class="nojump">
>         </td><td>Thursday, May 19, 2011 10:21:38 AM</td>
>         <td>1305814892</td>
>         <td>T</td>
>         <td></td></tr>
>     <tr rowid="3" target="r" class="machover">
>         <td class="nojump">
>             <input type="checkbox" r="1" value="r" name="delete"
> class="nojump"></td>
>             <td>Thursday, May 19, 2011 10:21:52
> AM</td><td>r</td><td>T</td><td></td></tr><tr rowid="4" target="1305210159"
> class="machover"><td class="nojump"><input type="checkbox" r="1"
> value="1305210159" name="delete" class="nojump"></td><td>Thursday, May 12,
> 2011 10:24:01 AM</td><td>1305210159</td><td>F</td><td></td></tr><tr
> rowid="5" target="1305214000" class="machover"><td class="nojump"><input
> type="checkbox" r="1" value="1305214000" name="delete"
> class="nojump"></td><td>Thursday, May 12, 2011 11:26:46
> AM</td><td>1305214000</td><td>F</td><td></td></tr><tr rowid="6"
> target="1305221746" class="machover"><td class="nojump"><input
> type="checkbox" r="1" value="1305221746" name="delete"
> class="nojump"></td><td>Thursday, May 12, 2011 1:35:52
> PM</td><td>1305221746</td><td>F</td><td></td></tr><tr rowid="7"
> target="1305297438" class="machover"><td class="nojump"><input
> type="checkbox" r="1" value="1305297438" name="delete"
> class="nojump"></td><td>Friday, May 13, 2011 10:37:29
> AM</td><td>1305297438</td><td>F</td><td></td></tr></tbody></table>
> </div>
>
> Million thanks in advance.
>
> Cristina
>
>  html.txt
> 3KViewDownload

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to