Mapping Table Rows by Cell value
I have a table with dynamic table structure and I want to make a dynamic namemapping for the row with the cell(0,0) with the value 1 is this somehow possible?
This way I could have a namemapping which always goes on the first element in the table and from there i could just select cell 0,0 - 0,1 - 0,2 - 0,3 ... so that I work with the row like its a 0x1 table
Is there such a feature to support this?
Solved! Go to Solution.
In common, It is good to map only the table into NameMapping and have your methods to get the value or set the value.
var tbl_Users = Aliases.mainpage.tbl_users; tbl_Users.wValue(0,1); //to get the values tbl_Users.wColumn(0);//to get the column name
Lot more options based on your Table techonology
Cells in classic HTML tables can be addressed using .Cell(i, j) syntax and TestComplete's Table object provides several other methods/properties (mentioned by @shankar_r).
The bad news is that HTML tables are seldom used in 'modern smart and fancy' web applications and usually are emulated via other UI elements (like divs, etc.) positioned via CSS or the like. So the chances are really high that you will have to create your own set of custom helper functions that will make it possible to search/navigate/paginate/etc. within your given table.
/Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.