Automation breaks even the activty able to identify Element

Hello this is simple automtion to show my other complex automations are breaking, I want you to break the automation at number after 2 or 3 or in the middle by closing the browser then the automation will not work as expected, please help.
Test.xaml (36.2 KB)

@HRUTIK_BAMBLE

Welcome to the community

please explain the issue…or attach a complete process or show some screenshots…if you give only xaml it wont open unless all dependencies and versions are same

for healthy discussion better to go with screenshots and an explaination

cheers

Kindly share more insights

Also if we close browser in between the run - Bot is expected to throw error only. In your case - it should go to catch block

May i know what exactly is the issue here?

Yes I want to break the automation, but after catch block it opens the browser and further iteration starts now according to me for the further transactions it should work fine but it doesn’t work as selector fails in run time even in debug mode.

You have given Use Browser activity in the catch block also. Kindly remove it from the code. It won’t open the browser

Check the activities included in the catch block.

But that is not the solution

Use throw activity in the catch block and give value as

New exception(“Error occured in the process.”)

Give this and let me know if this is what you are looking for