Nightwatch.js自定义命令此vs vs.api

时间:2016-07-21 23:11:28

标签: nightwatch.js

// myCustomCommand.js
module.exports = function () {
  this.SOME_NIGHTWATCH_COMMAND(...) // fails, undefined
  this.api.SOME_NIGHTWATCH_COMMAND(...) // works
}

有人知道发生了什么吗?

1 个答案:

答案 0 :(得分:0)

module.exports.command = ...代替module.exports = ...