/** * A basic Nightwatch custom command * which demonstrates usage of ES6 async/await instead of using callbacks. * The command name is the filename and the exported "command" function is the command. * * Example usage: * browser.openHomepage(); * * For more information on writing custom commands see: * https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-commands * */module.exports={command:asyncfunction(){// Other Nightwatch commands are available via "this"// .init() simply calls .url() command with the value of the "launch_url" settingthis.init()this.waitForElementVisible('#app')constresult=awaitthis.elements('css selector','#app ul')this.assert.strictEqual(result.value.length,3)}}