I am receiving the Selector Not Found Exception when running a UI Path solution to populate a legacy accounting system that we otherwise have no API for.
In the Studio, I used Desktop Recording to accomplish my immediate goals, however, this exeption raises itself upon the second (or any subsequent) iteration of the RPA process.
If I close out the accounting application and restart it, then the process works are far as I have it configured, but if I do not close it out and simply restart the UI process then this Exception is raised. It is always raised on the same control, which is a context menu, screen shot below:
Perhaps something in your selector is specific enough that it does not work on the second iteration?
You can try using “Attach to live element” on the selector that failed. UiPath will automatically update the selector to something less specific using wildcards. Alternatively you can try to insert wildcards in the selector yourself. Good information on the use of wildcards can be found here: Selectors with Wildcards
Folks here may be able to help if you share a screen shot of your selector in UI Explorer. A screenshot of the error in your sequence could also help.
I would look specifically at <ctrl automationid=‘258’ />
Try using Ui Explorer upon failure to select the target element and see what shows up as the selector. My hunch is <ctrl automationid=‘258’ /> will be a different value.
Martin, thanks again for replying. Your hunch was correct. The automation id becomes 264 on the second iteration. I will not have the time to revisit this until the latter half of my day here, but will try to figure something out short of restarting the application with each transaction we need to post.
You might be able to get away with inserting an asterisk (*) as the ID value for your selectors that are failing. UiPath will treat the asterisk as a wildcard. With any luck this will solve your problem.
So in your selector change
<ctrl automationid=‘258’ />
to
<ctrl automationid=‘*’ />
And see what happens