Try Catch activity not passing to catch when it fails

I have an Excel sheet containing links. The automation process retrieves each link and navigates to the corresponding web page. Once the website is open, it attempts to extract specific text content. However, if it doesn’t find the expected text, I expect the automation to proceed to the ‘Catch’ section of the activity. Unfortunately, instead of entering the ‘Catch’ section, it issues a warning that it cannot locate the UI element and remains stuck indefinitely.

The ‘Catch’ activity is designed to instruct the machine to log ‘Couldn’t get text’ in the Excel sheet when such a situation occurs.

Hello @Favarelaa Welcome to the UiPath Community Forum.

How are you testing the workflow - I assume you are in Debug Mode. Will you be able to post a snapshot of complete code along with Try Catch Block.

TryCatch

Thanks

Ou it looks like your right, it happened because I was in debug mode. When I execute it works, great.
Is that normal?

@Favarelaa Yes it is normal. Debug mode is used to navigate through code step by step that allows you to verify if code is working correctly or not. Also to check odd behaviour which is not possible while running in Run mode.

1 Like

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