Not able to click on row of datatable

Hi All,
i am in a situation, where i need to click on each row of datatable and the datatable is spanning into multiple pages.

What i am not able to achieve is

my workflow change the page number from page 1 to page 2 but not able to click on each row of datatable.

what i want is

bot should click each row of datatable from page 1 to page 8.

i have attached my workflow, please let me know in case of any doubt.ChangePage.xaml (6.1 KB) MainForLoop.xaml (6.0 KB) SelectEachRow.xaml (12.4 KB)

Please refer main for loop xaml to start

Hi @Rakesh_Tiwari

Your scripts looks ok but it could be your script is not waiting for the UI to be ready. There could be insufficient Delays or UI is not ready. Try adding a delay before Select Item inside ChangePage workflow.

To test if the UI issue, please enable Slow Step Debug mode and set checkpoints before the UI Automation activities. You should wait till the UI is fully loaded then continue with Step Into the next activity.

Hi @GreenTea ,

Thanks for your reply.

i have tried several time but found no luck.

The below error i am getting every time.
image

And below is the image of my Page which changes to page 1 to Page 2 and thrown the above error.
image

Hi @Rakesh_Tiwari

Since the error is SelectorNotFoundException, you can analyse the selectors values.

For example, with multiple UiExplorers opened…
First UiExplorer - shows page 1 column 5, row 2
Second UiExplorer - shows page 2 column 5, row 2
Third UiExplorer - shows page 3 column 5, row 2

Examine the selectors values for similarities and differences. Did you spot the differences and similarities?

Is it possible that when u change page of that table row number resets on page but not in your automation?

Hi @GreenTea ,

i found the similarity by checking the selectors, it is same as you said in earlier conversation.
Page 1, column 5, row2
Page 2, column 5, row2
Page 3, column 5 , row 2 and so on…
now, i know that row is being refreshed whenever page changes like it starts from beginning.

so, what would be the approach to solve it?

U can program click action with dynamic selector, containing table row index variable (int_Row.toString). After each row u change value for the selector by 1 (int_Row = int_Row+1). When you finished page, then click next page button and reset this integer with assign int_Row = 1 (or whatever value is for the first row in that table)

Hi @Rakesh_Tiwari

Assuming

  • numberOfRowsInPage = 5
  • Total rows = 99
  • row = current row number
  1. Assign activity, remainder [int32] = CInt(row) / numberOfRowsInPage
  2. If activity, If condition = remainder Then row = reminder.ToString Else [no change to row]

Test logic:
If row = 6, then remainder = 6 / 5 = 1
If row = 41 then remainder = 41 / 5 = 1
If row = 99 then remainder = 99 / 5 = 4
If row = 4 then remainder = 4/5 = 0