在某些错误中,我经常会收到“无法读取未定义的属性'log'”
https://github.com/graingert/wdio-console-log-crash/tree/master
我在很多错误中也遇到了这个问题。 来自webdriverio.js的287行:
this.logger.log('\tSaved screenshot: ' + fileName);
已经在解决这个问题:wink:
您能否同时说明如何手动解决此问题? 它在我的测试中导致过多的崩溃。
@eyalzek我通过在this.logger.log
调用周围放置if (this.logger)
来本地修复此问题。 可能有更好的方法。 🐵
https://github.com/webdriverio/webdriverio/blob/master/lib/webdriverio.js#L220
最有用的评论
已经在解决这个问题:wink: