Webdriverio: "Cannot read property 'log' of undefined" for crashes

Created on 18 Mar 2016  路  4Comments  路  Source: webdriverio/webdriverio

In some errors I often get "Cannot read property 'log' of undefined"

https://github.com/graingert/wdio-console-log-crash/tree/master

Bug馃悰

Most helpful comment

Already working on fixing this :wink:

All 4 comments

I'm getting this also in a lot of the errors. Coming from line 287 of webdriverio.js:
this.logger.log('\tSaved screenshot: ' + fileName);

Already working on fixing this :wink:

Can you please explain how to fix this manually in the meantime? It causes too many crashes in my tests..

@eyalzek I monkey-fixed this locally by putting an if (this.logger) around the this.logger.log call. There might be a better way. 馃惖
https://github.com/webdriverio/webdriverio/blob/master/lib/webdriverio.js#L220

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LaiaPR picture LaiaPR  路  4Comments

davidsoderberg picture davidsoderberg  路  4Comments

ViaMay picture ViaMay  路  4Comments

grofit picture grofit  路  4Comments

kiraLinden picture kiraLinden  路  3Comments