I know it can be done by getElementbyId(tableId), but I don’t have id attribute here. The table is like
<table>
<tr>
<td>data</td>
</tr>
<tr>
<td>data5</td>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
</tr>
</table>
I am using Htmlunit. Is there any way to get the <td> using htmlunit or java or any some api , JavaScript will work or not in I am not sure.
Using javascript DOM traverse:
Demo here: http://jsfiddle.net/AMbk7/