Is it possible to evaluate a variable inside a call read() in karate?

Viewed 121

demoType is a variable and I want the content of this variable to be what is evaluated in the following expression:

* def call read(demoType)

On the contrary, it tries to evaluate the name of the variable and not its content.

1 Answers

There is no such thing as def call.

Maybe you were trying:

* call read(demoType)

Or:

* def temp = call read(demoType)

Make sure you are on the latest version of Karate. And read the docs: https://github.com/intuit/karate#call-vs-read

Related