cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Grid Cell value in loop

Anonymous
Not applicable
I have Grid in a web page, and I would like to spy it such that I am able to browse through the cells and read/write/perform actions on each of them by providing the cell index (row/column). Is there a possibility for the same ?
2 REPLIES 2

AbhijithB_S
Level 2
For this, you can use Surface Automation to create regions for the cells in the Grid and also retain the images. Then you can use Recognise Text to capture cell values. You can use Dynamic Regions to move across/down the Grid by calculating the offset (in pixels) between each cell (both across and down), and loop until you have reached the end of the Grid. It is a bit tedious if the number of cells are more, but works fine if the cell sizes are symmetrical.

John__Carter
Staff
Staff
If you can spy the cell as an HTML element then you could try the Get Table read option to read the table into a collection. If you want to operate on cells directly then use a technique know as 'dynamic path'. This is where you spy a cell and set the Path attribute to Dynamic. This enables you to set the Path value in the diagram instead of using a fixed value in Application Modeller. You can then use Data items and Calculations to construct a path value, eg ""/HTML/BODY(1)/TABLE(1)/TBODY(1)/TR("" & [Row Number] & "")/TD("" & [Column Number] & "")