Forum Discussion
I invoke the TC and Project suite -> driver script main function thru startup script then this driver script will run. for every test runs DriverscriptMain function name is getting displayed in project log. Instead of DriverScriptMain name if it displays csv file name "login" it will be useful to get project log. because I export the test log based on csv file name only. If project log consists of this csv file name means I will easily retrive the project log.
//USEUNIT Function_Generic
function AppScriptDriver(CurrentDriver)
{
var ScreenName = DDT["CurrentDriver"]["Value"](0);
var FunctionName = DDT["CurrentDriver"]["Value"](1);
var ObjectName = eval(DDT["CurrentDriver"]["Value"](3));
var DataValue = DDT["CurrentDriver"]["Value"](4);
switch (FunctionName)
{
case "TxtSetTxtboxValue":
TxtSetTxtboxValue(ObjectName, DataValue, ScreenName);
break;
case "ObjClickObject":
ObjClickObject(ObjectName,ScreenName);
break;
case "AppExportResultsHTML":
AppExportResultsHTML(ScreenName);
break;
default:
Log["Message"]("Invalid Function selection");
break;
}
}
function DriverscriptMain()
{
var Driver;
// Creates the driver
Driver = DDT["CSVDriver"]("C:\\testset\\Login.csv");
// Launch the Application
AppLaunch();
// Iterates through records
while (! Driver["EOF"]() )
{
AppScriptDriver();
Driver["Next"]();
}
// Closing the driver
DDT["CloseDriver"](Driver["Name"]);
}