Get Text from ID (N Get Text) Failed:

Hi, I am using the Get Text activity to extract an ID Number. However, the ID has different formats, and I think this is why it sometimes works and sometimes doesn’t. I’ve also used the wildcard “" to make the extraction dynamic. Both ID formats show the same UI elements, with the only difference being the numbers at the end, so I replaced them with "”.

The scenario is as follows:
If I set the target to an ID like “ID: xa412qwe5sa” (a random format), it successfully extracts all IDs with that random format. However, if the format looks like “ID: NTG5171Q”, an error pops up, and it fails to extract.

This issue happens both ways. When I set the target to an ID like “ID: NTG1237JS” (a specific format), it extracts all IDs with that format, but fails to extract the randomly formatted ones like “ID: qOp0ajQx7”.

@james07

Welcome to the community

Please check the selector you are using

Generally we would not use attributes which changw in selector…to get the correct one which is not dynamic we use ui explorer and check the attributes which do not change

Cheers

1 Like

Hello @james07 and welcome to the UiPath Community Forums! :partying_face:

Can you please share the selector your are using for the Get Text activity.

Cheers

Steve

1 Like

Thank you!

I am using the Fuzzy Selector, for more information. Here’s the SAMPLE values inside the Fuzzy Selector:

a.) For the Random Formatted ID:
< webctrl parentid=‘q-portal- -dialog–7’ tag =‘DIV’ type=‘’ class= ‘text-subtitle1 text-grey-8 q-mt-xs’ />

b.) For the Formatted :

Then what I do to make it dynamic is like this:
< webctrl parentid=‘q-portal- -dialog–’ tag=‘DIV’ type=‘’ class='text-subtitle1 text-grey-8 q-mt-’ />

Thanks in advance for helping me!
The image shows examples of HTML-like code snippets with dynamic and formatted IDs using wildcard characters. (Captioned by AI)

Hi Sir Steven! Thank you

I am using the Fuzzy Selector, for more information. Here’s the sample values inside the Fuzzy Selector:
image

Then I change it into this, because I believe this should make it dynamic:
image

Give this a try:

< webctrl parentid=‘q-portal*dialog*’ tag =‘DIV’ type=‘’ class= ‘text-subtitle1 text-grey-8*’ />

Let us know how you go.

.

.
To paste an asterisk * in a forum post you need to escape it with a backslash \
Aka insert this \*

1 Like

@james07

Try to open selector in ui explorer and select the attributes which are not changing as mentioned

Cheers

1 Like

Thank you so much Sir @Steven_McKeering , I tried it twice and it worked. I’ll test it on other scenarios also.

Thank you so much @Anil_G , I appreciate it!

1 Like

Great news, yes Test Test Test.

Hopefully all goes well.

Cheers

Steve

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.