Constructor
new DriverService(executable, optionsnon-null)
Name | Type | Description |
---|---|---|
executable | string | Path to the executable to run. |
options | ServiceOptions | Configuration options for the service. |
- Source
Classes
Members
(static, constant) DEFAULT_START_TIMEOUT_MS :number
The default amount of time, in milliseconds, to wait for the server to start.
- number
- Source
Methods
address() → (non-null) {Promise.<string>}
- Source
If the server has not been started.
- Type
- Error
A promise that resolves to the server's address.
- Type:
- Promise.<string>
isRunning() → {boolean}
Returns whether the underlying process is still running. This does not take into account whether the process is in the process of shutting down.
- Source
Whether the underlying service process is running.
- Type:
- boolean
kill() → (non-null) {Promise}
Stops the service if it is not currently running. This function will kill the server immediately. To synchronize with the active control flow, use #stop().
- Source
A promise that will be resolved when the server has been stopped.
- Type:
- Promise
start(opt_timeoutMsopt) → (non-null) {Promise.<string>}
Starts the server if it is not already running.
Name | Type | Attributes | Description |
---|---|---|---|
opt_timeoutMs | number | <optional> | How long to wait, in milliseconds, for the server to start accepting requests. Defaults to 30 seconds. |
- Source
A promise that will resolve to the server's base URL when it has started accepting requests. If the timeout expires before the server has started, the promise will be rejected.
- Type:
- Promise.<string>