Gets a log from Selenium.

Usage

.getLog([typeString], callback)

Parameters

Name Type description
typeString string|function

Log type to request

callback function

Callback function which is called with the result value.

Example

this.demoTest = function(client) {
  this.getLog('browser', function(logEntriesArray) {
    console.log('Log length: ' + logEntriesArray.length);
    logEntriesArray.forEach(function(log) {
       console.log('[' + log.level + '] ' + log.timestamp + ' : ' + log.message);
     });
  });
};

See also