Catch error "Ui Element not found corresponding to this selector" even my selector or the element is correct/prensent

Hi all,

In my process, sometimes I have an exception “Ui Element not found corresponding to this selector” but my selector is correct and the element is present because in general it’s run succesfully.
My problem is, when this error occur, my process is stopped although I use a Try/Catch. I would like that my robot catch this error to close the item et run the next one as is presented in my ReFramework.
Would you have any solution to suggest me ?



By default in Studio when you click Run button, It will Debug, so make sure you selected Run File and Run


Hope this helps you


Hi @MigT ,

Please help me understand :slight_smile:

  1. Do you surround a specific activity (to which the problem is associated) with try catch?

  2. Since you are using RE Framework, if the activity fails, the bot should handle it as exception( retry) and proceed with next transaction item. So, is this happening?

Thanks @Srini84, but in Debug it’s running succesfully. I don’t want that my bot stop in case of UiElement not found if it’s present and catch it to continue to run the next one

Thanks @juveria.siddiqui

To respond to your questions :

  1. No it’s random
  2. Yes I know, but unfortunately the bot stop directly

@loginerror or @Pablito do you have any solution about this issue please

Hi @MigT

Could you let us know:

  • your version of Studio (if it’s an Enterprise license, it’s often more convenient to have our technical support have a look for direct assistance)
  • your UIAutomation package version?
  • example of the element you try to interact with (screenshot of it would be fine, the selector as well)
  • some details about your process (a sample xaml that showcases your current setup would be great)

Hi @loginerror,

Thanks for replying and sorry for the delay.
It’s a Studio enterprise 20.4.1, with a UIAutomation package 20.4.1 version.
The elements that the robot try to interract unsuccesfully are random, but in general it’s working. You can find an exemple in which the robot should to type the formulaire model (dynamique). But independantly to where a “UI element not find” error is product, is it able to catch it to avoid that the process is stopped ?
Finally to summarize this process, the robot should to read the client folder ready to declare the VTA and then proceed to the differents steps of VTA declaration and send a reporting file to the accountants.


It looks really specific and therefore might be best if you chat directly to our technical support (they could then collect all necessary information and escalate it as a bug to improve UI Automation package).

One quick idea here would be to try the same process on the latest 20.10 activity packages first to see if the behaviour isn’t already improved for these types of forms :slight_smile:

Thanks @loginerror

Ok I will contact the technical support on that and try before with UI Automation package 20.10

Best regards,

1 Like