1
在cucumber-js page世界构造例子显示出与僵尸的例子:黄瓜-JS:与phantomjs
// features/support/world.js
var zombie = require('zombie');
var WorldConstructor = function WorldConstructor(callback) {
var browser = new zombie();
var world = {
browser: browser, // this.browser will be available in step definitions
visit: function(url, callback) { // this.visit will be available in step definitions
this.browser.visit(url, callback);
}
};
callback(world); // tell Cucumber we're finished and to use our world object instead of 'this'
};
exports.World = WorldConstructor;
有可能使用Phantomjs而不是僵尸?
有人可以给我看一个world.js的例子吗?
谢谢。
请你帮我出https://stackoverflow.com/questions/48297950/cucumberjs-how-to-use-worldconstructor-across-different-features – Valay 2018-01-17 11:12:57
@Valay对不起,但我没有用了两年。 – drinor 2018-01-18 09:15:14