Array Declaration Issue
Script
function ReadWholeFile(strPath)
{
var FileCon = new Array();
FileCon = new Array (6);
var FileName = aqFile["OpenTextFile"](strPath, aqFile["faRead"], aqFile["ctANSI"]);
// Obtains the total number of lines in the file
var LineCount = FileName["LinesCount"];
FileName["SetPosition"](1, 0);
for (var i = 0; i < LineCount; i++)
{
// Obtains the current line
while (! FileName["IsEndOfLine"]() )
{
// Obtains the letter and its number
var sLet = FileName["ReadString"](1);
var LineCount = FileName["Column"];
// Specifies the string
var strDelimiter = "|";
var FileValue = FileName["ReadToSymbol"](strDelimiter);
Log["Message"](FileValue);
/* here I want to get the values in a array. After reading the file I want to compare the values to select a appropriate function using switch case.*/
}
}
}
.txt file
ScreenName,FuncOrStepCall,WindowName,ObjectName,DataSet1,DataSet2
User Signon,TxtSetTxtboxValue,Login,obj1,1234,
Search button,ObjClickObject,Login,obj2,
Form Load,AppWaitScreen,Login,,2000,
Role,DdlSetDropdownListValue,Login,obj3,Teller,
I have searched all the test complete help, but am facing issue while declaring array and using the same. If anyone knows help me to declare a array and how to assign the values in run time. (I want to get the values inside the while loop in a array).