Data Driven Testing using Excel file and import in to my script multiple times
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019
07:31 AM
06-26-2019
07:31 AM
Data Driven Testing using Excel file and import in to my script multiple times
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.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019
09:45 AM
06-26-2019
09:45 AM
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
