I have built an automation which interacts with few websites based on the data in google sheets, Inside For each loop, if this specific activity “which clicks on a certain icon” fails I want the loop to exit and resume to the next row without executing the rest of the activities. Please guide.
Use Try Catch activity inside the for each loop and put your activities inside Try section.
This will ensure if any activity fails inside this it will continue on next iteration.
In catch section you may log the activity details which is failed for reference if you required.
If you want the activity to continue only when the click activity receives an error, use the activity in a Try Catch and put the activity Continue in the Catch.
This way, it skips the activities after Click and moves on to the next row.
You can use check app state/element exists activity inside for each loop after clicks on a certain icon, if next screen appear then perform other activities otherwise use Continue activity for perform next transaction.
@Asad_Afzal1 I would second @ashokkarale’s solution. It solves your problem, so please mark it as the solution. One thing to keep in mind: if you want to do it your way, the applications will remain open, so you’ll need a recovery mechanism to prevent them from interfering with the next “for each” item. Cheers!
However, there are few activities of less significance, if failed I want the automation to move forward and for which I am using “Continue on Error” property.
My concern is if this one activity fails, the automation should move onto the next iteration only.