现在Nightwatch 1.0.19中Section的构造函数需要创建两个参数,我不确定如何传递第二个参数,有人可以告诉我吗?
class Section extends Element {
get section() {
return this.sections;
}
constructor(definition, options) {
super(definition, options);
this.client = this.parent.client;
this.api = this.parent.api;
this.commandLoader = this.parent.commandLoader;
const BaseObject = require('./base-object.js');
this.props = BaseObject.createProps(this, definition.props);
this.elements = BaseObject.createElements(this, definition.elements);
this.sections = BaseObject.createSections(this, definition.sections);
BaseObject.addCommands(this, definition.commands || []);
CommandWrapper.addWrappedCommands(this, this.commandLoader);
}
}