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.
-
asterisk is used when there are multiple characters which are dynamic in a selector
-
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
HI @Vamsit2030
welcome to the community!!
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?
Hi @Palaniyappan
I have an example
I want to use wildcard for INC0010059 so that click happens for the first incident
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ā¦
It is partially visible
ā¦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
@Vamsit2030 Thatās Amazingā¦Keep goingā¦
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:
Hi thanks for your reply, I wanted to ask you, what would you do, if you want to scrape anything that comes into the aaname attribute?
Iām using: aaname = ā*ā. But the result itās an empty stringā¦thanks!
Hi
Welcome to uipath community
We can go for get attribute activity and get the value of aaname
Cheers @Alexis_Ayala
Perfect Sir. Will give it a try
Thank you!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.