* Sets the port to start the server on. * * @param {number} port The port to use, or 0 for any free port. * @return {!DriverService.Builder} A self reference. * @throws {Error} If an invalid port is specified.
(port)
| 389 | * @throws {Error} If an invalid port is specified. |
| 390 | */ |
| 391 | setPort(port) { |
| 392 | if (port < 0) { |
| 393 | throw Error(`port must be >= 0: ${port}`) |
| 394 | } |
| 395 | this.options_.port = port |
| 396 | return this |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * Defines the environment to start the server under. This setting will be |