Я попробовал то, чего вы хотите достичь с помощью этого шага (шаг может показаться глупым, это всего лишь тест):
Then I should see these in Missing required fields popup "test"
| fieldName |
| Category |
Автоматически сгенерированное определение шага:
Then(/^I should see "([^"]*)" these in Missing required fields popup$/, function(arg1, callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
Кажется, невозможно передать параметр и таблицу одновременно. Вместо этого вы можете передать stdNumber в функцию getCellInfo, используя значения в таблице:
Then(/^the student info for student "([^"]*)" should be correct in the fund list page$/, function (table, studNumber) {
table.rows().forEach(row => {
return this.pages.prd2Page.getCellInfo(row[2]).then((actualTexts) => {
return assert.deepEqual(row.toString(), actualTexts.toString());
//return console.log(actualTexts.toString());
});
});
});
}
огурец справка также объясняет альтернативные способы использования.
примечание: мой пример - машинопись