Cannot perform click text on webpage

I am using this activity, Click Activity, below is the text from the website

uipathquestion
Filename

When, I highlight it, it does indicate at the correct place. However I make it dynamic so that it will click based on the variable I obtained from get text.

Variable = Filename

The error of click activity as below
uipathquestion4

However, it gives me error. So, I try to HTML Encode it but still gives me error.

@aqiff

You didn’t pass the variable into selector properly. It should be something like this.

     aaname = '"+Str_failLink+"'

It still gives me error

can you try this aaname='{{Str_failLink}}'

if that doesnt work, create a new str varaible str_failLinkTmp
then before click activity, assign str_failLink.Replace("'","'") to str_failLinkTmp
then change selector to this aaname='{{str_failLinkTmp}}'
image

@aqiff

Can you please print the this variable Str_failLink using Message Box activity before that Click activity and check whether it’s printing correct value or not.

Below is the output. It is the same

uipathquestion6

Sure, I can test this logic. However, I believe there are many other characters that are not recognizable by Click Activity. How do I make this dynamic ?

its already dynamic since Str_failLink is a variable
for the other characters that are not recognizable you can do this, this should handle all the characters i think

image

  1. str_failLink.Replace("'","'") to str_failLinkTmp ( you already have this)
  2. str_failLinkTmp.Replace("&","&") to str_failLinkTmp

This is the full list from Escaping XML Data , but (<,>, “”) are not allowed in file names so i think handling ’ and & are fine

Char Escape String
< &lt;
> &gt;
" &quot;
&apos;
& &amp;

This is what I need ! a list of escaping xml data but i did not know what to search. Thank you so much! it is working !

1 Like

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