module selenium-webdriver/net/portprober

Functions

findFreePort(opt_host)code »

Parameters
opt_hoststring=

The bound host to test the port against. Defaults to INADDR_ANY.

Returns
webdriver.promise.Promise<number>

A promise that will resolve to a free port. If a port cannot be found, the promise will be rejected.


isFree(port, opt_host)code »

Tests if a port is free.

Parameters
portnumber

The port to test.

opt_hoststring=

The bound host to test the port against. Defaults to INADDR_ANY.

Returns
webdriver.promise.Promise<boolean>

A promise that will resolve with whether the port is free.