0
我有一个CSV数据。我想重复每一步,除了在nightwatchjs读CSV一步,然后执行与CSV每行这些步骤。 nightwatchjs怎么可能呢?重复步骤再次在nightwatchjs新数据
步骤都像
module.exports =
{
"ReadCsv" : function(client) {
// This will have an array of csvData
},
"StepOne" : function(client) {
//Code goes there...
},
"StepTwo" : function(client) {
//Code goes there...
},
"StepThree" : function(client) {
//Code goes there...
},
}
我要重复的步骤的StepOne,StepTwo & StepThree与csvData让一切都可以被测试的每一行。我试过是
"loopUntilEnd" : function(client)
{
for (var i = 1; i < csvData.length; i++)
{
this.StepOne(client, csvData[i])
this.StepTwo(client)
this.StepThree(client)
}
},
但它并没有奏效。