Exception Type: SelectorNotFoundException Error Message

I am currently working on Infopath forms. I have tried capture some data using gettext functionality of the tool.
Now, every time the session ends for Infopath, the “Selector” values get updated. Because of which, I am unable to capture the required values.
I have tried normalizing the Selector values by making them a regular expression. But it doesn’t work.

Please let me know the workaround for the same.

Hey @nesachdeva

A quick explanation of the “selector” property
The selector is a string of characters (VB expression) used to identify objects on the screen. The selector is one of the properties of UI activities and has an XML format. All the activities in UiPath Studio related to graphical elements have the selector property.

The solution to this problem is to:
• build better selectors

  • Use Wild Card operators.

To see the better and dynamic attributes compare the selectors and make dynamic them using wildcard operators and identify reliable selectors using UIExplorer.

Selectors attributes part contains all the attributes of an object. Not all can be added or removed from your selector string, because not all of them are useful for identifying a certain object.

The most important thing when choosing selectors is to pick those which always have a constant value. If the value of an attribute changes, then the selector will not be able to correctly identify the element.

Attributes may change their values from time to time when the application’s UI changes. When this happens, part of the dynamic attributes often remain unchanged and we somehow have to specify the variable parts. This can be done using wildcards:

1.* star means zero or more characters can be there. Example: title=‘* - Notepad’.
2. ? question mark means exactly one character. Example: title=‘Expl?rer’.

A direct consequence when using wildcards is the increased probability of there being more and more nodes matching the Selector.

for more info follow this link:



I am trying to pass AAname as dynamic value to selector as below:
<html app='chrome.exe' title='Transmissions Result' />"+"<webctrl parentid='rgSGSec.' tag='A' aaname='"+ CurrentScrapedId.ToString+ "' />

Current Scraped id is having dynamic value which will be fetched from Ui, while looping through each currentScrapedId for first instance got worked,second instance thrown below error

<html app='chrome.exe' title='Transmissions Result' /><webctrl parentid='rgSGSec.' tag='A' aaname='4461279' />

PFA screenshot of Ui which has 4461279 numberNumbersScrape_error

hey @ndivya

Can you do like below and check?

 <html app='chrome.exe' title='Transmissions Result' />"+"<webctrl parentid='rgSGSec.' tag='A' aaname='"+ CurrentScrapedId.ToString.Trim+ "' />

Let me know…!!


No ,It’s not wrkng…after adding Trim .

just debug it with either uiexplorer that you are getting same selector and debug your id by writeline.


PFA trace Report,Slector is able to receive second row value but only click event on that particular hyperlink is not happeningTrace

Use findElement and then pass that element variable to the click. See if it works.

1 Like

Hi @aksh1yadav
I have tried to make a dynamic selector by using wildcard * but when I run for first time it’s working fine for next iteration it’s unable to find the selector and throwing an exception as mentioned in the title of these post.
Tried find children also but no luck any workaround to achiev these.
Note the browse is an sap web application.