Unanswered question

Access File Variables from within Javascript action?

Hi,
I have a CSV file which I want to read in the javascript file. The file variable is named as AUTHDATA.
This is how Im accessing it in java script.

var authData=context.variableManager.getValue("AUTHDATA");
logger.info("AUTHDATA Name:"+ authData.hostname );

For some reason, it return null. It works when I use ${AUTHDATA.hostname} in the request file, but i dont want to use this value there directly. what am I doing wrong here

Sendhil K.
Sendhil K.

Sendhil K.

Level
0
25 / 100
points

Answers

Sendhil K.
Sendhil K.

Sendhil K.

Level
0
25 / 100
points

Figured out by other post:
var hostname=context.variableManager.getValue("AUTHDATA.hostname");
logger.info("Host Name:"+hostname );