Variable in web element


AM I correct to understand we cannot use variable in Web Element ?
I get error in on this web element : xpath value is build dynamycally and at the moment of the error it value was


Error :

WebElement xpath harcoded?


Currently, variables in the XPath field are not supported.

Please vote for this feature to raise its priority.


Thanks for your answer

So how do you suggest to loop through a list of xpath like :
… and so on ?

Is there any way to capture all similar elements based on XPath

Anyone got an answer to this?


I’m struggling with this one as well. I would be very happy to see variables used as an input to elements like mouse clicks using an XPath.



please vote for this topic to see this feature in RPA Recorder as soon as possible.


Please add this feature to use variables in xpath field.


The XPath way of doing this would be to get them all at once using “Web Element” and then save the resulting elements to a list:

//*[contains(@id, "result")]/div/

Afterwards you can loop through the resulting list and do the appropriate actions on each item.

1 Like