Fail to catch XPath in treeview



Hi there,
My test website is some internal network, and RPA runs fine until catch the treeview node.
I catch the XPath from Chrome and it looks quite different: //*[@id="$/shared_disclosure"]

My test codes here: (1.8 KB)



Hi Jason,
The xpath doesn’t work because it contains $ and /. You can avoid the error by putting the xpath in a string variable and then using this variable in the action.


Hi @ashapkina
Still not work. I want to ask do I catch the right xpath?




The variable name in the xpath is in parentheses. It should be put in curly brackets: ${treeviewxpath}.


Wow!!! Its the brackets, thank you so much.:heart_eyes:


Glad I could help :slight_smile:


Somehow the above solution didn’t work for me. RPA Express didn’t recognized the escaped $. So I’ve come up with a different solution.

In case the attributes contains any invalid symbol you can use the contains() function and specify the attribute tag and contents.

e.g. class="$bold-character"