守夜框架的方案大纲示例

时间:2019-12-23 13:17:47

标签: nightwatch.js cucumberjs

任何人都可以发布带有场景大纲及其实现的js文件的示例功能。

我坚持执行。

我尝试过的方法如下:

    Given User launches application
    And User verifies "<firstname>" "<lastname>" displayed successfully

Examples: 
| firstname | lastname |
| JOHN| SMITH |

in step-definition file:
  Then(/^User verifies "([^"]*)" "([^"]*)" displayed successfully$/,firstname,lastname =>{
    return client
              .assert.containsText('/body',firstname)
}```

ReferenceError: firstname is not defined
    at Object.<anonymous> (C:\Users\Desktop\nightwatch\step-definitions\UserApp_CreateNewAppAndVerify.js:189:71)

0 个答案:

没有答案