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.
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.
I am trying to pass AAname as dynamic value to selector as below: <html app='chrome.exe' title='Transmissions Result' />"+"<webctrl parentid='rgSGSec.2.1.1.2' 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
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.