Forum Discussion
Without knowing the properties of your grid, and scripting language we can't help you. We need a lot more information.
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.
- prabhjot88singh5 years agoContributor
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_BOTHMA5 years agoCommunity Hero
It would be really helpful if you could include the Objct browser for this table. Sometimes tables are in the traditional <table><tr><td> format, but more commonly in modern application, these are custom build with divs, panels, textboxes etc.
Extremely generic:
You will have to use find methods to identify the rowindex of the "first" row - which contains the data, since it won't neccessarily be the first row in the "table" You will probably also need to do a find in the objects with the rowindex of the header row and in that do a findchild where the contentText is the column's name. You then know what the columnIndex is. Combine rowIndex and columnindex in a find and you have a cell to get a value from.
FindAll where rowindex is "row" 1 and some other criteria such as where the objects are textboxes and you have all the fields in an array to populate your data.
Related Content
Recent Discussions
- 2 days agovladd1