In RFT, I have a HTML table that is different every time, depending on the previous steps. So, I have identified its "ID" and tried to find the table like this:

Table1 = find(atDescendant(".class","Html.TBODY",".id", "5PrdTblBdy"));

Next, I have created a GuiTestObject:

GuiTestObject dyn_table=(GuiTestObject) Table1[0];

Next, I have declared a table and tried to fetch the contents of the dynamic table to it.

ITestDataTable myTable;
myTable = (ITestDataTable)dyn_table.getTestData("contents");

The problem is that the following line does not work for a dynamic table:

myTable = (ITestDataTable)dyn_table.getTestData("contents");

If I try the same with the table with which I have recorded the script then it works fine.

myTable = (ITestDataTable)table_htmlTable_4().getTestData("c ontents");

where “table_htmlTable_4” Is the name of the object that I have recorded. But I need to use a dynamic table and get its content since “table_htmlTable_4” would be a different object every time, depending on the previous steps.

What I would like to do next is to extract a particular value from the table using a “for loop”, which should not be a problem, if I am able to fetch the table content in myTable.

Please help.