如何在Nightwatch 1.0.19中创建节

时间:2019-03-26 10:22:17

标签: javascript nightwatch.js

现在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);
  }
}

0 个答案:

没有答案