XPath with a variable

Hi
I would like to change the number a the end of following XPath while iterating through a for loop, could you kindly let me know how to do it: //*[@id=“nameArea_1359606”]/a . I would like to change the number 1359606 to some other number which is stored in a variable

1 Like

@heera you can use 2 variables: one to store the number, the other one to store the XPath

image

XPath - //*[@id=“nameArea_${my_number}”]/a

You cannot use it directly in the action because of the dollar sign.

1 Like

Got it, thank you.

1 Like