Forum Discussion
If you are finding the "Cell" within the table, then it should respond to standard table properties. This means your table object should have a RowCount property.
So, if you want to read the first column of the last row, you should do something like this:
tableObject.Cell(tableObject.RowCount-1, 0)
EDIT: Since your table is dynamic in rows, the above method is the recommended method for getting to any particular cell. Mapping the cell will not get you what you want since that first number will be changing every time. When it comes to dynamically generated content like this, it's best to map the parent object (in this case, the table) and use code expressions like what I've noted to get to individual cells.
- Adagio8 years agoFrequent Contributor
Thanks Robert
As I explained in my post that no matter which row I'm looking at every cell in the first column is mapped as Cell(0,0) so RowCount doesn't help here. for more Info please have a look at this one: ColumnIndex and RowIndex is always set to 0
Thank you
Abhi
- shankar_r8 years agoCommunity Hero
Instead of mapping unique cells, If you know what entry[one unique column value is enough] is going to add it your table, then you find them with the expected values and see whether those entry got reflected in table or not.
If you are not sure what values going to add, You can't validate it right way but you can validate with assumption that it is inserting it lastrow.
- Adagio8 years agoFrequent Contributor
nope..I wouldn't know what data might appear in the table. it's all being auto-populated by restful services and the size is never the same...sometimes there are 8 rows and sometimes there are 3 rows. I would want to read the value of Cell in first column after reading the corresponding status in the same row in second Column.
Thank you
Abhi
- tristaanogre8 years agoEsteemed Contributor
What you are looking at there is not the mapping, it is the object browser. Can you give us a screenshot showing the table object in the object browser with the child objects expanded? It should look something like:
Basically, what I'm suggesting you do is to not use Object Spy or any other way of grabbing the cell directly from the screen but to enter in the code as I showed in my first response. In my example above, my Table has these properties:
Do you have similar properties?
- Adagio8 years agoFrequent Contributor
Sure Robert..here's the screenshot. you'll see that here only columnindex would change, and rowIndex would always remain 0
Thank you
Abhi
- sriram_sig6 years agoContributor
when i try to retrieve value from the cell using -
tableObject.Cell(tableObject.RowCount-1, 0)
I'm getting an error object not callable. Do you know how this can be resolved?
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 8 hours ago