Forum Discussion
I wrote custom code to detect the rows in a table and then click on a button within another cell of the table. Here is a basic script I use to identify then iterate through the rows to find the desired value, then click on the corresponding button...
let TotalRows = Aliases.browser.PAGENAME.TABLENAME.ChildCount;
// Log.Message(TotalRows, "", 0);
for (let i = 1; i < TotalRows; i++) { //Starts on the first data row, rather than the header row.
if (Aliases.browser.PAGENAME.TABLENAME.Cell(i, 0).contentText == DESIREDVALUE) {
Aliases.browser.PAGENAME.TABLENAME.Cell(i, 3).FindElement("[type='button']:nth-child(1)").Click();
return true;
}
}
I have also found running loops within loops tends to slow down TestComplete greatly, but haven't foun a great workaround to speed it up.
Related Content
Recent Discussions
- 3 days agovladd1