Troubleshooting


  1. Test timeouts

1. Test timeouts

If you receive a timeout, it could come from the testing framework you are using, or from WebDriver. For example, if you use WebDriverIO with Mocha, there is a default timeout of 10 seconds.


Test Framework Timeouts

Test framework timeouts can be resolved by increasing the timeout option specific to your test framework.

Here are some examples for WebDriverIO, which supports various testing frameworks:


WebDriverIO with Mocha Example:
// wdio.conf.js
exports.config = {
  framework: 'mocha',
  mochaOpts: {
    timeout: 90000
  },
  ...
}
WebDriverIO with Jasmine Example:
// wdio.conf.js
exports.config = {
  framework: 'jasmine',
  jasmineNodeOpts: {
    defaultTimeoutInterval: 90000
  },
  ...
}
WebDriverIO with Cucumber Example:
// wdio.conf.js
exports.config = {
  framework: 'mocha',
  cucumberOpts: {
    timeout: 90000
  },
  ...
}

WebDriver Timeouts

WebDriver timeouts can be increased via the "timeouts" capability.

The following WebDriver timeout defaults are used:

capabilities = {
  ...
  timeouts: {
    script: 90000,
    pageLoad: 300000
  }
}

Additional information on WebDriver timeouts can be found here.