Unanswered question

Variable Replacement does not seem to work with Xpath Expression

Assume if i have Xpath Expression to extract certain value
Pre Requisite : create a Variable name Var with value=abc

//ASObject/CreateObject[contains(text(),'${Var}')] - does not fetch any value from response

//ASObject/CreateObject[contains(text(),'abc')] - works fine and able to extract a value from response.

Manjunath G.
Manjunath G.

Manjunath G.

Level
0
1 / 100
point

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

In the Variable extractor panel, your variable ${Var} is not processed i.e not replaced by its value. That's why you won't see the result right away in that configuration panel.

But if you run a user validation, your variable should be replaced and then your XPath should work.

Have you tried?