node-chromedriver icon indicating copy to clipboard operation
node-chromedriver copied to clipboard

Make chromedriver.start() timeout configurable

Open Janpot opened this issue 7 years ago • 1 comments

Since https://github.com/giggio/node-chromedriver/pull/177 you can make .start return a promise. But the timeout of waiting for an available port seems to be fixed at 10s. I propose to make this call more flexible so that a different timeout can be configured. Maybe it can look like

await chromedriver.start({
  args: [ 'some-arg' ],
  timeout: 30000
});

or

await chromedriver.start([ 'some-arg' ], {
  timeout: 30000
});

Would you be interested in accepting a PR for that?

Janpot avatar Mar 08 '19 09:03 Janpot

Yes, but it would be better to support options. Like so:

chromedriver.start(args, opts);

Where opts is type boolean | { timeout: number }. Then the start method has to be changed to understand the type and we can configure.

giggio avatar Apr 16 '19 21:04 giggio