Wildcards in selector

Can some one explain me how to use wildcard in selector to select first element in the page everytime

Hi @Vamsit2030,

Welcome to UiPath Community Buddy…Do you have any selector on hand for example, or can we provide you with some examples…?

Cheers

HI @Vamsit2030,

Wild card charaacters are incase if the selector contains an attribute which is changing for example id of an field most of the times it changes so this things are handled by using wildcards.

  1. asterisk is used when there are multiple characters which are dynamic in a selector

  2. Question mark is used when there is only one character changing the attribute.

and in your case as to select the first element, I think we don’t need to use wild cards, instead we can build the selector in static way using UIExplore.

Regards,
ShivaKarthik

1 Like

HI @Vamsit2030

welcome to the community!! :smiley:

yes. wildcards are used to replace dynamic elements of the selector so it can be used for many instances.

Example selector
<html title='ACME System 1 - Account - Log In' /> <webctrl tag='H1' aaname='Account - Log In ' />
So here, let’s assume the “Account” word in he title can change time to time. In that case we can change the selector as follows

<html title='ACME System 1 - * - Log In' />
<webctrl tag='H1' aaname='Account - Log In  ' />

So, adding “*” will enable the selector to work regardless of what word is available in between those two dash characters. like wise we can use it any where in the selector to make usable in multiple instances. We can also add the wildcard to aaname property as well like this for example

<html title='ACME System 1 - Account - Log In' />
<webctrl tag='H1' aaname='*- Log In  ' />

Does it help?

3 Likes

Hi @Palaniyappan
I have an example

I want to use wildcard for INC0010059 so that click happens for the first incidentCapture

Can you share the sample selector again… looks like we are unable to view it

Great…Ok

So In that selector, Kindly replace INC0010059 with * symbol, like

<html ...../..

<Webctrl aaname = ‘Open record: *’ parentid = ‘…’ tag…

I have added the example selector

So what happens is, If you have used click option for that selectors, it will selector any field or file and button with any name starting with Open record: …

And i have one more kind suggestion, some times parent id might be changing dynamically, if so replace that with Wildcard as well…

Hi @Vamsit2030

Is my reply visible…? If not kindly tell me…

Hi @Palaniyappan

It is partially visible

This was my reply buddy…hope would be helpful

So what happens is, If you have used click option for that selectors, it will selector any field or file and button with any name starting with Open record: …

And i have one more kind suggestion, some times parent id might be changing dynamically, if so replace that with Wildcard as well…

Yes, the parent id is changing dynamically and i used wildcard
its working
Thanks for the help @Palaniyappan @Lahiru.Fernando

1 Like

@Vamsit2030 That’s Amazing…Keep going…

1 Like

Hello @Vamsit2030,

Here you can know more about the wildcards

https://studio.uipath.com/docs/selectors-with-wildcards

Regards
Balamurugan.S

1 Like

Hi,

I just want to ask how to get the numbers of records in this system possible output are (No Records, 1 Record, 400 Records) it depends on the patch panel I’ve searched but upon using the wildcard still I cannot get the # of records. See below:

image