node-chromedriver
node-chromedriver copied to clipboard
Make chromedriver.start() timeout configurable
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?
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.