Use * in String selectors

Hi Everyone,

I am using selectors as strings due to elements being dynamic and i need to add custom attributes in the selectors. But when i use the * operator in string selector it’s throwing error. Does UiPath not recognize * operator when using selector as string. And if not is there a workaround for this?

Here’s the example of selectors that i’m using:

Thanks in advance.


Uipath will recognize *
Try to validate and highlight your selector after modifying your selector. See if the selector is found.

Your selector itself looks okay, but with the url variable we cannot validate it with you, and this is most likely the issue

What is the error that is being thrown? This would evaluate the final selector for you, and I’d examine this, could even put it in a highlight activity to help you to investigate if you don’t want to necessarily click or whichever action you are doing is.

As an example

url = ""

Highlight activity with a target of

"<html app='firefox.exe' url='"+url+"' /><webctrl aaname='*' tag='A' parentclass='mr-3' />"

and a timeout of 5000ms while is open on a page.

It will throw an Error due to the url variable not matching.

  "message": "Highlight 'A': Cannot find the UI element corresponding to this selector: <html app='firefox.exe' url='' /><webctrl aaname='*' tag='A' parentclass='mr-3' />",
  "level": "Error",
  "logType": "Default",
  "timeStamp": "22:47:22",
  "processVersion": "",
  "jobId": "5c656279-8508-4911-b0c8-6f673a66d17d",
  "robotName": "TimBot",
  "machineId": 14,
  "fileName": "Main"

correcting the double e and it will highlight the first matching Anchor tag which is the Terms link in the footer.


1 Like

Hi @codemonkee

As i checked when the URL hits, additional string is added to the site on complete page load for example if the URL is it becomes But the original url part is still included in it. Now when i’m using this selector

there’s an error saying couldn’t find element

And also highlight activity wouldn’t work with one of the image element because the element i’m trying to find is a loader with tag of img. so in it’s selector i wrote as i mentioned above selector with proper id and tag in the wait element vanish activity. But if i mention the url in selector it won’t find the element but when i remove url it’s able to find it. But this is a problem because in case of multiple browsers it will throw error.
This is the selector