Working on web tables/grids

#1

Hi,

Can anyone please share more information on how to work on a use case where user need to select multiple rows/columns from a table shown up on a web page?

I tried to select multiple rows by pressing ALT key (start field configuration) but its not working.

Thanks.

#2

Hi,

You can iterate over a table or grid data in following manner

  1. Define a argument rowind of type Integer and assign value 0 to it using Assign activity
  2. Now using Alt key configure two values of same column in grid.
  3. replace Item Index variable with rowind for Item Index property

RowIndex

  1. You can use the activity configured in Step 3 in a while loop and iterate over row count variable incrementin its value by 1 to get value of each row for the column selected
#3

I did the exact same steps mentioned here. After incrementing the count in while loop, the new increment value is not getting replaced in variable used in “Item Index”.

Eg:

  1. I defined a int variable as “row” and assigned it to ‘1’ in assign activity
  2. In While loop I captured the screen scarp of 2 consecutive elements
  3. Replaced the “item Index” with variable “row”
  4. After performing Click operation on 1st row of the grid or table, incremented the row = row +1
  5. Now, comin again inside while loop (as condition satisfied) this time the row value in writeline is updated to ‘2’ correctly, but still perform the click action is performed on row 1 only (same as previous iteration), instead it should click on row 2 (as it got incremented)
#4

Am placing the activity in Try block and hence its not updating the increment value in “item Index”.
Without Try block I get the error “failed to attach to IE window hnd”

#5

You need to increment item index variable value. Based on that value only row is selected

#6

I have incremented, Pls refer to Step 4 mentioned above

#7

What do you mean by this then
Am placing the activity in Try block and hence its not updating the increment value in “item Index”.