Stabilizing Selectors

My program is working and running fully but one out of every 10 or so runs, a selector stops working. I have been just going in and re-indicating the selector which temporarily solves the problem. However, in the long run, this bot needs to be much more error free to be put into production.

Do you guys have any “best practices” in terms of stabilizing selectors so they fail less often? Thanks.


Out of curiosity, have you tried using a full selector for the troublesome spots rather than a partial? I have seen on occasion where the partial selector fails to work.

To be honest, I’m not sure of the difference between the two. So I really don’t know which I have been using.

The full selector gets generated automatically if you use a Click or Type Into activity outside of an Attach or Open Browser activity. While the partial selector gets generated when you use those activities inside the Attach or Open Browser activity.

The first line in a full selector is the Application, essentially. In the partial, that first line is omitted, if that makes sense.

Also, when you use UiExplorer, which can be opened from the Uipath Studio ribbon, you will see the full selector generated. And, typically you would want to use the partial selector by leaving of the Application part of the selector when using an activity inside the Attach or Open scope.

I hope that makes sense.


That makes sense. Most, if not all, of my selectors are inside an Attach Browser activity. I have looked at them in the UIExplorer but I have not messed/changed them within there much at all.

I have also noticed that the program runs error free the less often I run it. Or in other words, if I test it continuously, one run after the other, more and more bugs pop up.

Maybe it’s a timing issue. If the page takes time to load then you would want to adjust the TimeoutMS property of the activity that fails.

The issue could be a number of things though. Since you say more and more bugs pop up the more you run it tells me that there could be some timing inconsistencies, but I wouldn’t be able to tell without working in the website with your code.

I understand that. I have adjusted the TimeoutMS and delay before/after on occasion which has seemed to help some. I will continue to play with these properties and test them out.

Thanks for all your help.