Webelements in loop with workflow


I have loop for span elements which are kinda links. My goal is to click each link and trigger workflow. Workflow does certain actions on the following pages like datascraping etc. The final actions comes back to main websites where all spans are located - I click “save seettings” and web automatically takes me back to the first screen. The problem is that loop works for first element and does all the job and when second element s supposed to be executed I receive error that uielement is not longer valid. My selectors are correct as checked them on highlight and each of them worked.

Also the workflow opens another browser and another website. Is is matter of activating the first browser as robot looses the elements ?

Can you please share the screenshot and are you using dynamic selector ?

Thanks for answer :slight_smile: I have resolved it by myself. My first assumption was to click each element in uipath.core.uielement nested loop but as I see DOM resets the data after page has been reloaded. What I actually did was creation of datatable where I kept all the selectors gathered in nested loops. Later on I just ran my workflow in datatable loop where I changed selector attributes with row output :wink: