Ask a Question

Mapping Table Rows by Cell value

SOLVED
Lagencie
Frequent Contributor

Mapping Table Rows by Cell value

Hello,

 

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?

2 REPLIES 2
shankar_r
Community Hero

In common, It is good to map only the table into NameMapping and have your methods to get the value or set the value.

 

Like below,

 

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

Ref: https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/grid/wvalue-property-...

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/grid/wcolumn-property...

Lot more options based on your Table techonology


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

AlexKaras
Champion Level 3

Hi,

 

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.

Regards,
  /Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: