Hello,
I have a CSV file with URLs in the columns. I am using UI.Vision Kantu to open these URLs. The issue I am having is that I am hard coding each column which will become problematic as more URLs are added. My question is, are there ways to loop through each column in a CSV rather than writing each column in one long line of code? I have included my code below:
{
"Name": "Edge_Chromium_Apps",
"CreationDate": "2019-12-5",
"Commands": [
{
"Command": "csvRead",
"Target": "TestData.csv",
"Value": ""
},
{
"Command": "executeScript",
"Target": "return 0;",
"Value": "counter"
},
{
"Command": "storeEval",
"Target": "new Array ('${!COL1}', '${!COL2}', '${!COL3}', '${!COL4}', '${!COL5}', '$!COL6}')",
"Value": "websites"
},
{
"Command": "while_v2",
"Target": "${counter} < ${!csvReadMaxRow}",
"Value": "counter"
},
{
"Command": "storeEval",
"Target": "storedVars['websites'][${counter}]",
"Value": "site"
},
{
"Command": "open",
"Target": "${site}",
"Value": ""
},
{
"Command": "executeScript",
"Target": "return ${counter} + 1;",
"Value": "counter"
},
{
"Command": "end",
"Target": "",
"Value": ""
}
]
}