|
|
@ -4,10 +4,12 @@ import EventEmitter from 'events' |
|
|
|
class GetBrowserLogs extends EventEmitter { |
|
|
|
class GetBrowserLogs extends EventEmitter { |
|
|
|
command(this: NightwatchBrowser): NightwatchBrowser { |
|
|
|
command(this: NightwatchBrowser): NightwatchBrowser { |
|
|
|
this.api.getLog('browser', function (logs) { |
|
|
|
this.api.getLog('browser', function (logs) { |
|
|
|
logs.forEach(function (log) { |
|
|
|
if (logs && Array.isArray(logs)) { |
|
|
|
console.log(log) |
|
|
|
logs.forEach(function (log) { |
|
|
|
|
|
|
|
console.log(log) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
}).perform(() => { |
|
|
|
}).perform(() => { |
|
|
|
this.emit('complete') |
|
|
|
this.emit('complete') |
|
|
|
}) |
|
|
|
}) |
|
|
|