How to convert special characters to html entities?

Hello,

I am trying to get the value attribute from an option in a select list:
image

The problem is when I use the get attribute activity and I want to use the mentioned text as a selector, the bot doesn’t find the element because the variable should be in XML format:
image

Is there a way to convert special chars into HTML entities?

1 Like

Hey @stan_rod

You can just try decoding it with .net library functions we have.

System.Net.WebUtility.HtmlDecode

Hope this helps

#nK

1 Like

Thank you so much for your response, @Nithinkrishna

It worked! I used System.Net.WebUtility.HtmlEncode for this case though

2 Likes

Pleasure :hugs:

Happy Automation.

1 Like

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