Error: "Value for property is not a valid XML syntax."


I am currently working on an automation task that involves opening a web browser to download a file. This action is triggered by clicking a hyperlink, which redirects to a PDF. To accomplish this, I am utilizing the “For Each Ui Element” functionality, as the webpage contains multiple links that require clicking. However, a challenge has arisen due to a unique character (“&”) present in one of the links. I’m not sure if is this character in particular, but it seems it is.

This special character is causing an issue within UiPath, resulting in an error message such as: “Click ‘…’: Value for property [Target.Fuzzy selector] is not in a valid XML syntax.”.

The problematic link in question is: “

I am actively seeking a solution to this problem and would greatly appreciate any guidance or insights you might have.

Best regards

  1. Assign Activity (to encode the URL):
    Create a new Assign activity in your workflow.
    Use the following code to encode the URL with the “&” character:

encodedUrl = System.Net.WebUtility.UrlEncode(“”)

2. Click Activity (using the encoded URL):
 Use the `encodedUrl` variable in your `Click` activity instead of the original URL. UiPath will click the hyperlink with the correctly encoded URL.
1 Like


replace & with &


or you can even use this




Thank you!!! This works

1 Like

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