webdriverio: 'browser.getLogs' unknown command:

Environment (please complete the following information):

Config of WebdriverIO selenium

Describe the bug When calling

browser.getLogs('browser')

appear following error: ERROR webdriver: Request failed due to Error: unknown command: session/bb3d82dbd3473e43c568efb90e8c1846/se/log

To Reproduce Steps to reproduce the behavior:

browser.navigateTo('https://www.google.com');
console.log(browser.getLogs('browser'));

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

Thanks for the link! I came into the same conclusion myself this morning. For anyone else googling this issue and scrolling straight down, this fixed browser.getLogs for me:

// wdio.conf.js
exports.config = {
  // ...
  services: ['selenium-standalone'],
  seleniumInstallArgs: {
    drivers: {
      chrome: {
        version: '77.0.3865.40', // depending on when u see this, you may want something newer
        arch: process.arch,
        baseURL: 'https://chromedriver.storage.googleapis.com',
      },
    },
  },
  seleniumArgs: {
    drivers: {
      chrome: { version: '77.0.3865.40' },
    },
  },
  // ...
};

However, this version broke sendKeys (which can be worked around with getActiveElement and elementSendKeys)

@WilliamNurmi its not enough to install chromedriver you should also use it.

See https://webdriver.io/docs/selenium-standalone-service.html#configuration