Looks like a bug. We probably should handle the case when there are no rows under tbody. You could try putting a <tr></tr> under tbody, which should return 0, to confirm the bug.
On 10 Jan 2011, at 12:58, Eric Gokavi <[email protected]> wrote: > Hello, > > i have have simple table as below. > > <table style="display: block;" class="dbox" id="SERVICETABLE"> > <colgroup> > <col class="cgText"> > <col class="cgText"> > <col class="cgControl"> > <col class="cgControl"> > </colgroup> > <thead> > <tr> > <th>Name</th> > <th>Type</th> > <th>Edit</th> > <th>Remove</th> > </tr> > <tr id="20" class="altrow"> > <td>Name2</td> > <td>ABC</td> > <td> > <a href="javascript:edit(20)"> > <img src="/edit.gif"> > </a>< > /td> > <td><a href="javascript:delete(20)"> > <img src="/remove.gif"> > </a> > </td> > </tr> > > <tr id="10" class="row"> > <td>Name1</td> > <td>XYZ</td> > <td> > <a href="javascript:edit(10)"> > <img src="/Infinity/csa/images/edit.gif"> > </a> > </td> > <td><a href="javascript:delete(10)"> > <img src="/Infinity/csa/images/remove.gif"> > </a> > </td> > </tr> > </thead> > <tbody> > </tbody> > </table> > > I am not able to get data for the table, when i call > getTableMaxRowNum("TableName") it gives me an error as follows > > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: > 147.171 sec <<< FAILURE! > testApproveAssetWithoutChange(com.sungard.infinity.webtests.test.registry.assetwithoutconfig.ApproveAssetWithoutChangeJUnitTestCase) > Time elapsed: 89.687 sec <<< ERROR! > com.thoughtworks.selenium.SeleniumException: ERROR: Element > jquery=#SERVICETABLE > tbody:eq(0) > tr:has(td) not found > > i guess as we dont have any thing in <tbody>. > > I get the getTableHeaderColumnNum("TableName") as 4 and i get the > headers when i call getText("TableName.header[1]") . > > How can i get Table data or what am i doing worng here? > can anyone help please? > > > > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
