Forum Discussion
8 Replies
- cunderwCommunity Hero
Without knowing the properties of your grid, and scripting language we can't help you. We need a lot more information.
- RUDOLF_BOTHMACommunity Hero
Agreed. Could you supply a bit more information ? It's not even entirely clear to me whether you are doing desktop or web testing - it looks like web, but you never know. How do you intend to use the data ? In other words, do you need to know all the values in the rows, are only interested in one of the fields etc.
- prabhjot88singhContributor
Hello Rudolph and Team,
Please note my response below:
1. Yes, it is a web based testing application.
2. As part of our project, I am interested in fetching both the things from data table
a. How to retrieve all the rows values/data inside these rows
b. Also there is one test case wherein I need to fetch particular cell value from a column.
Please See the screenshot attached, I would like to fetch firstly all the rows from this data table to a List or array.
Ands secondly I also need all Employee IDs(column Number 4) from this web table to be stored somewhere in the variable, so that I can use this column value for expected data output comparison.
Please share your responses, as it is quite urgent.
- RUDOLF_BOTHMACommunity Hero
Have alook at this thread that discusses something similar and includes links to other similar queries. It might give you some starting point
- prabhjot88singhContributor
- RUDOLF_BOTHMACommunity 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