UiElement no longer valid error when using Find childre activity

I have used Find children activity,and looping through each children.Using get attribute to get the aaname attribute.For the first iteration it worked fine,second time it throwed UiElement no longer valid error.Can someone please help

Hi @Alekhya_Kalakurthi ,

Could you please share a snapshot of the UI Selector?
You could also view the retrieved UIElement collection in Immediate Panel to get an idea of what went wrong.

Kind Regards,
Ashwin A.K

@ashwin.ashok here is the selector editor for find children activity.

Tried by removing idx,but still same

If you are looking for either aaname or other attribute value which can give us the value needed then surround that specific GET ATTRIBUTE activity with a try catch and in try block have this get attribute activity with aaname as attribute
Where as in catch block have the same get attribute activity with innertext or text or name as attribute

So that even if aaname is not there then you can get the value from other attributes

Cheers @Alekhya_Kalakurthi

Hi @Alekhya_Kalakurthi ,

Could you give us a View of the Selected Element in the UiExplorer?

Also, You could Check the Visual Tree in the UiExplorer and Identify the Elements whose values are to be extracted and also Check their Selectors, making sure the aaname attribute is available.

By analysing these and confirming if the aaname is present for all the elements, we can move forward with the next analysis where we will Debug the Flow and Observer the elements being retrieved.