How to create dynamic xpath in the selector


I want to create dynamic URL. I have following in the selector:

“xpath”: “div[1]/a”

and I want to convert it into:

“xpath”: “div[& var &]/a”

where var is a variable.

Hi @Sandy_Mehta

You can try this way and see if it works for you.

"xpath": "div[{{var}}]/a"

1 Like

Thank you @kowts. It’s working :slight_smile:

1 Like

Glad that the solution worked! :+1:

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