Using DDT Driver for test data excel sheet to my script but it is not working .Could you give me the syntax how I iterate multiple test data in to my scripts:
I am using this syntax:
function Test() {
var xlValue = Project.Variables.TestData;
// Initialize the iterator
xlValue.Reset();
// Iterate through rows
while (!xlValue.IsEOF()) {
var input = xlValue.Value("Customer Name");
Log.Message(input);
xlValue.Next();
}
return input;
}
But how I include in to my test and multiple customer name is running.
Solved! Go to Solution.
This is all you need to reiterate through all the records in the excel worksheet:
function Test() { DDT.ExcelDriver("File path and name", "Sheet name"); While (!DDT.CurrentDriver.EOF()) { Log.Message(DDT.CurrentDriver.Value("CustomerName")); DDT.CurrentDriver.Next(); } }
Thanks
-Lino
This is all you need to reiterate through all the records in the excel worksheet:
function Test() { DDT.ExcelDriver("File path and name", "Sheet name"); While (!DDT.CurrentDriver.EOF()) { Log.Message(DDT.CurrentDriver.Value("CustomerName")); DDT.CurrentDriver.Next(); } }
Thanks
-Lino