Desktop Windows GridView Click on particular record

Hi,

I have problem with clicking gridview in desktop application based on “Supplier Invoice” value in “File Type” column. The row position will be changed depending on data.

@yee68

Try to indicate the cell in ui explorer and get a common selector which does not involve the value of the row

Then either a table row property or idx can be used to increment and access all cells

…once that is in plce …get text can be used to check for value and then the row can be found

Cheers

Hi @yee68

→ Use the extract datatable activity to extract the data and store in a datatable datatype variable.
→ Use for each row in datatable activity to iterate the each row in the datatable.
→ Inside for each insert if condition to check the condition.
→ Inside if condition insert assign activity to store the file type in a String variable called FileType.
→ After assign use click activity and indicate the first file type in the webpage.
→ When indicating element check the strict and uncheck the fuzzy and image.
→ open the UI explorer of click activity and select the attribute which contains file type, replace the attribute value with the FileType variable.

Hope it helps!!

Thanks for solution. I can not extract data table from grid as UiPath extract table can not detect grid cell. I try with find children and UiPath can only dedect up to whole row and can not identify cell inside the row.

1 Like

Give a try using for each Ui element activity. @yee68

for each UI element restricted to web application only. Can not use for desktop window.
I tried with classic screen scrapping, I can manage to see list of rows in UI explorer.
Pls advise how can I continue.

Thank for advise. From click text activity, I can see rows in ui explorer.
May I know which activities I can use to extract all rows from grid
and find the row with correct value to click.

I have tried “Find Element”, “Find Children”, extract table , extract data and can not detect row from grid. foreach element can be used only in web application.
image

@yee68

All of those are aupported only on web…that is the reason I have given a different way to do that…dont useclick text…instead use in loop…get text and find the row idx and use idx to get the next value as explained above

Cheers

Thanks for reply. May I know which activity I can use to loop grid.

@yee68

Use a normal for loop or while loop and use idx property to get each row or cell separately…

Use the index as variable in selector in place of idx

Flow looks like this

  1. Do while and in properties add variable to index
  2. Assign and add 1 to index variable as index starts from 0
  3. Check app state …to check if the current idx row exists…(use index variable in idx of selector
  4. If exists get the text using idx in selector…if required text then get the value from the column needed and on else side do nothing
  5. On first else side of check app state use a break to end loop if rows are over

Cheers

Table show rowcount =1 (look like count only header row). I saw there is 3 data rows.
Is there any way I can get selector list under “Client Data Panel”