0

When I have a Cucumber step definition in JavaScript using WebdriverIO and call:

browser.debug();

...it times out in ten seconds, which is never long enough. Several docs and blog posts advise something like this answer's "Note: The default timeout for the .debug() command is short. Make sure you increase it." But none spell out exactly how to do that.

I've tried things like:

browser.debug({wait: 120000});

...and this, in wdio.conf.js:

exports.config = merge(configs, {
  waitforTimeout: 120000,
  connectionRetryTimeout: 90000,
  framework: 'cucumber',
  cucumberOpts: {
    timeout: 60000,

Neither of these (and similar attempts) have extended the debug timeout.

How can I extend the browser.debug timeout in a Cucumber step definition?

David Hempy
  • 5,373
  • 2
  • 40
  • 68
  • 1
    [The docs](https://webdriver.io/docs/api/browser/debug/) suggest you increase the timeout _of the test framework_, not the command (which likely doesn't have its own timeout, that wouldn't make sense). https://webdriver.io/docs/timeouts/#framework-related-timeouts suggests that should work for Cucumber, what output do you get? – jonrsharpe Nov 22 '21 at 21:30
  • Thanks, @jonrsharpe. I have the framework timeout at 60 seconds (see `cucumberOpts.timeout`, above), as your link suggests. But `debug` still times out in 10 seconds. The only output I'm seeing is ` function timed out, ensure the promise resolves within 10000 milliseconds` – David Hempy Nov 23 '21 at 15:20
  • ...but today, it is working. :head_scratch: `cucumberOpts.timeout` works as advertised. Guess I had some other wires crossed yesterday. – David Hempy Nov 23 '21 at 15:24

1 Answers1

0

Control the timeout (in milliseconds) in cucumberOpts. For example, in wdio.conf.js:

exports.config = merge(configs, {
  cucumberOpts: {
    timeout: 60000,
  }
}
David Hempy
  • 5,373
  • 2
  • 40
  • 68