Forum Discussion
sarya
15 years agoFrequent Contributor
Hi,
I figured out a way to find a static value from the table.How can I find a dynamic value from the table for the cell having innertext as "user2" from the table as attached in the screenshot .The code belows brings up all the values from the rows with cell0 value .What can I do if I want to retrieve only one particular value from all the values in the cell0 .For example I need to find the cell0 with innertext as "user2" that is part of the full string "user2 4 1 1" How to write it in the below if loop.
I figured out a way to find a static value from the table.How can I find a dynamic value from the table for the cell having innertext as "user2" from the table as attached in the screenshot .The code belows brings up all the values from the rows with cell0 value .What can I do if I want to retrieve only one particular value from all the values in the cell0 .For example I need to find the cell0 with innertext as "user2" that is part of the full string "user2 4 1 1" How to write it in the below if loop.
page.NativeWebObject.Find("namePropStr","groups32.gif","IMG").Click();
group = page.NativeWebObject.Find("innerHTML","TestGroup","A");
tbl = page.document.frames.Frame("main").document.all.Item("table_1");
for(i = 0; i < tbl.rows.length; i++)
{ for (j = 0; j < tbl.rows.item(i).cells.length; j++)
{
a = tbl.rows.item(i).cells(0).innerText;
Log.Message(a);
}
Related Content
Recent Discussions
- 8 hours agoSvetaG