Forum Discussion

DanH's avatar
DanH
Contributor
6 years ago

Can you change the data source used in a Data Driven Loop using a script?

I'm wanting to change the datasource (Excel spreadsheet) used in a Data-Driven loop.  The scenario is, I have some tests which work fine, but I would like to feed different data into them from an Exc...
  • tristaanogre's avatar
    6 years ago

    Yes.  Question, though, is whether or you're doing Keyword testing or Script testing.  Script testing is easy... just make the excel file path in the ExcelDriver method  a variable and change the variable assignment.

     

    For Keyword testing, not quite so easy.   What I would do is put the loop in script code and call the keyword test within the loop.