webdriverio: TypeError: Cannot read property 'indexOf' of undefined

The problem

-TypeError: Cannot read property 'indexOf' of undefined

Not so informative error message. There’a some cases when it’s possible to reproduce:

browser.setValue(selector, undefined);
let element = browser.element(selector);

browser.selectorExecute(selector, function (element) {
    element.remove();
});

element.getText(); // Error
  • WebdriverIO version: latest
  • Node.js version: 7.1
  • Standalone mode or wdio testrunner:
  • if wdio testrunner, running synchronous or asynchronous tests: wdio testrunner
  • Additional wdio packages used (if applicable): wdio-mocha-reporter

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (11 by maintainers)

Most upvoted comments

@Tuckett45 I don’t see any references to WebdriverIO that could have caused the issue. You might want to reach out in the Vue.js channels with that.