任何人都可以发布带有场景大纲及其实现的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)