黄瓜webdriverio数据表

时间:2018-09-12 10:00:43

标签: cucumberjs

功能文件

Feature: Shopper can add an item to their Grocery List

@kk
Scenario: Mutate multiple User Skills at the same time

Then If I click the row "Summary" then I should the following nested information`
  | Tax       | 11.50  |
  | Gratuity  | 4.50   |
  | Total     | 26.59  |

StepDefininition文件

Then(/^If I click the row "([^"]*)" then I should the following nested information$/, function (rowName, data){
 cconsole.log("rowName-----"+rowName)
 console.log("data-----"+data)
 data = dataTable.raw();
 console.log(data);`
});

错误日志  如果我单击“摘要”行,则应嵌套以下信息

  dataTable is not defined


  ReferenceError: dataTable is not defined
at World.<anonymous> (/Users/src/__acceptance__/stepDefinition/android/wdio.apps.stepdefs.js:12:3)
at new Promise (<anonymous>)
at new F (/Users/wdio-cucumber-framework/node_modules/core-js/library/modules/_export.js:36:28)

请帮助我解决此问题.....

0 个答案:

没有答案
相关问题