Forum Discussion
Have alook at this thread that discusses something similar and includes links to other similar queries. It might give you some starting point
Hi,
Please find attached the Object Browser tree for the grid view.
Please advise on how to get the first row ,specific column data printed
Best,
Prabhjot
- RUDOLF_BOTHMA5 years agoCommunity Hero
To make life easier on yourself, you should probably Name Map Panel("transactionTypeGridDiv") to something like TransactionTypeTable
Although it might change from grid to grid, my guess is that panel(1) is your first row of data.
That means that to get the entire first row, you would be using a findchild something like so:
var PanelWithRow1 = Aliases...TransactionTypeTable.FindChildEx("Panel","1",1); var childPanelWithData = PanelWithRow1.FindChildEx("Panel","0",1);
//or ("Panel","1",1); if that's the panel with the data in var dataArray = childPanelWithData.FindAllChildren(cellcontainer,uniqueidentifierofcells).toArray(); //uniqueidentifierofcells can be a wildcard e.g. "*" you may need to use multiple properties and values e.g objecttype=textbox and visible=true //dataArray now has all the cells in your first data row and you can read from the array- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Hi prabhjot88singh,
I agree with Rudolf - using Name Mapping sounds reasonable here. Please read the following tutorial explaining how to map objects manually:
Also, pay attention to mapping criteria - they should be reliable. Don't use Index or similar properties whose values are changed from run to run.
Once you map the cell, you can use the wText property or a similar one to get the value of the mapped cell.
Related Content
Recent Discussions
- 22 hours agoGane195