For Each UI Element - Delete "Link" Not Finishing and Random Order

Good day. Currently I am struggling to create an automation that automatically deletes every record from the page. The problem is it deletes the records randomly from the list and then UiPath stops mid-way without throwing any errors. I have tried setting input mode to hardware and then to simulate, but the results are pretty much the same.

I would like it to delete from the top record to the last record on the page.

Any help would be appreciated.

@ruan.nagel1611

Once you delete all the idx and all will chnage…so instead of for each ui element

please use check appstate together with selector for only first delete…as once the first is deleted the second becomes the new first and that can be repeated till check app state is true

flow will be like this

do while loop

check app state(check for first delete…<webctrl tag='A' innertext='Delete' idx='1'/>)

On then side use click to delete

on else side use a break

condition in do while can be True

for safety include an max counter in do while to negate infinite loop

cheers

1 Like

Thanks again. Works :smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.