How come UIPath can't find an element it previously found?

I’ve been working on an automation for quite some time. I did about 10 test runs today and it got to a point where it failed. I was working on that issue, and rerunning, and suddenly it began failing earlier. There is a drop down box where it makes a selection and continues on. In my previous 10 test runs today, it did that successfully. Now 3 times in a row it has failed there, reporting that it can’t find the UI element. I DIDN’T CHANGE ANYTHING THERE! How is it that this app just loses something that it previously found? And this is not the first time I’ve noticed this behavior. I’m pretty exasperated. I seem to actually be going backward with my automation.

Hi @pbrase
is the error is associated while clicking option from dropdown, then check whther the correct values are used to select option in dropdown

Regards,
Nived N

Yes, the values never changed from the 10 times it ran correctly to the 3 times it suddenly errored out. Now I have it failing it on virtually the very first thing it needs to do, which it did successfully on all the previous runs, including the 3 where it fails on the dropdown. The more I use UIPath, the more unstable and unreliable it feels.

Sometimes application may be not loading properly which makes bot difficult for execution of that activity. To avoid that try to increase timeout of activity

But why would that suddenly become a problem after a series of successful runs of the app? i didn’t change anything in that part of the program. It spontaneously began failing.

Hi @pbrase,

Such scenarios can happen sometimes due to latency issues.

To get this covered, few of the below handlers can be considered(depending on the type of activity):

  1. Increase timeout
  2. Wait for Ready property - as Complete
  3. Retry scope usage which only exists once an element in the drop down is found
  4. Simulate click enabled

Hope this info helps.

Regards
Sonali

And now this is happening again today. Things it could find yesterday suddenly today it can’t find. I made no changes. I’m going around in circles spending all my time getting it back to where it was yesterday. Now in Studio I’ve once again got the issues that were previously fixed and then broke fixed again and in Studio once again my automation runs correctly. However, when I publish this revised version to Orchestrator and attempt to run it in unattended mode, it still fails at one of the points I fixed in Studio. That is, the automation behaves differently depending on the environment. So this can be added as another point of concern for me, along with the automation’s unfortunate tendency to break spontaneously.

Hi @pbrase,

Yes it does happen sometimes due to latency issues. We have faced this multiple times in different environments.

Thats why have suggested above(in my last reply to you) handlers to include in your code to ensure its working consistently despite latency/nw issues :slight_smile:

Regards
Sonali

Hi,

If it is not a latency issue, it is maybe a selector issue. I had this issue a lot of time. Be careful that your selector is reliable, meaning you’re using things like “class”, “parent-class”. Avoid using “id” or “idx” inside selectors. The robot can find 50% of the time the element, and 50% not if you have a selector like that :slight_smile: It’s pretty common.

Therefore, if you have too many bugs even if you correct the selector, try to check the WaitForReady option as “Complete”, or to put a Type Into or Click instead of a Select Item.

Good luck,