I have this simple typing into username field using modern activities and I purposely make the selector wrong so it will throw an error but there is no error thrown. See attach file below
TIA
I’m expecting a error here since on my code it is on try catch and sending email on exception
If the selector is valid, it will type into some other element. And if the selector is empty, it will probably type into the browser itself (just like you can send hotkeys into a whole window).
Here’s a simple test scenario. I’m attaching to a Notepad instance and within the scope, using a Type Into activity with no selector specified. As a result the robot will type into the window.
If it’s a valid selector on the webpage you are directing it to, there would be no failure. You would need to change it to something that doesn’t exist. Or just close the browser.
It’s working now there is a bug with try catch I just replace the old try catch with a new one and it is working now. Thanks for the reply! Appreciate y’all
If you intentionally make a selector error in your UiPath automation workflow and you are not seeing an error being thrown, there could be a few reasons for this behavior:
Try-Catch Configuration: First, ensure that the Try-Catch activity is correctly configured. The sequence inside the “Try” block should contain the activity with the incorrect selector, and the “Catch” block should contain the actions you want to perform when an exception occurs.
Exception Type: Check the type of exception you are catching in the Catch block. If you are catching a specific type of exception (e.g., UiPath.Core.SelectorNotFoundException), ensure that the error you are intentionally causing matches the exception type you are trying to catch. If the exception type does not match, the catch block will not execute.
Error Handling Settings: Verify the error handling settings for the activity. By default, some activities may be configured to “ContinueOnError,” which means that they will not throw an exception and will simply continue to the next activity even if there is an error. Ensure that the “ContinueOnError” property is set to False for the activity that you expect to throw an error.
Selector Validation: UiPath may have improved its selector validation and recovery mechanisms in more recent versions. If the activity with the incorrect selector does not cause a critical error in the workflow, it might not trigger the Catch block.
Debugging: When debugging in UiPath, some exceptions may not halt the workflow if you are in debug mode. Make sure you are running the workflow in a non-debug mode to observe the error behavior accurately.
Logging: Check the robot’s logging settings. If you have configured logging to a lower level (e.g., “Info” instead of “Error”), errors might not be reported as exceptions, and you may not see them in the logs.
To troubleshoot this issue, you can:
Verify the Try-Catch configuration, including the exception type and the “ContinueOnError” property.
Temporarily set the error handling for the activity to “Throw” to force it to throw an exception for testing purposes.
Check the logs and output pane in UiPath Studio to see if any error messages or warnings are displayed.
If you are still facing issues, please provide more specific details about your workflow and the versions of UiPath Studio and the activities you are using so that I can provide more targeted assistance.