This is the JSON values for the macro I am currently using…
{
“Command”: “executeScript_Sandbox”,
“Target”: “var arr = ; for(var x = 0; x < 20; x++){arr = ; for(var y = 0; y < 50; y++){arr[y] = (x+1)*(y+1);}}; return arr”,
“Value”: “array1”,
“Description”: “”
},
{
“Command”: “csvReadArray”,
“Target”: “data_from_array.csv”,
“Value”: “myCSV”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${myCSV[0][0]}”,
“Value”: “”,
“Description”: “”
}
]
}
Currently, I just have the array printing the value at column 0 row 0. This works fine but the issue with it is the application I am testing, once an invoice is submitted into the system that same invoice number can never be used again due to validation. Is there a way I can select a value out of my array at random each time the test is run? I want to avoid having to go back each time and manually changing the array row and column values.