I am working on an application which has a documents Grid. The grid has more than 10000 rows, we have option to filter but even on filtering the row no of specific row does not change eg, my intended row to work on is at 105 position, if i apply filter and get only 2 visible rows, the row no of intended row still shows as 105.
Is there any method in testcomplete which can return us row no of gird using searching specific unique text like we have a method in UFT as GetRowWithCellText("String_Text") ?
There is few solutions for you, check this points:
1) Use TestComplete 'text-recognition' option. With this option on You can search for any element currently visible on screen. For example if you have 5 rows in your grid and with third row you have a text 'document1' then you can search for this text as TextObject and read its properties.
2) Second solution its to deploy application in 'Debug mode', after that you can natively read grid properties like:
readSecondRowInSecondColumn() (method name its fake )
3) Third the most weird one is to read all property values by its 'Top' coordinates. For example the third row is always in the same line so it's Top coordinates will be for example 50 px. With this knowledge you can read all data in all columns for single row.
Hope this helps you.
I have written one function to get the row index and click on the specific grid depending on the value (Text)
You have specify the Grid object, and column name in which you have the values and the values
function FindRow(Grid, Column, Value, ViewId)
if (typeof(ViewId) == "undefined")
ViewId = 0;
for (var i=0; i<Grid.wRowCount(ViewId); i++)
if (Grid.wValue(i, Column, ViewId) == Value)
RowIndex = FindRow(Grid,Column,Value);
Thanks for the great suggestions, Wamboo, anupamchampati.
@Ajaypokharkar, do they help you resolve the issue? Which reply can we mark as a solution?