View Source

# module selenium-webdriver/http/util

Various HTTP utilities.

## Functions

### getStatus(url)code »

Queries a WebDriver server for its current status.

Parameters

url`string`

  Base URL of the server to query.

Returns

`webdriver.promise.Promise<Object>`

  A promise that resolves with a hash of the server status.

### waitForServer(url, timeout)code »

Waits for a WebDriver server to be healthy and accepting requests.

Parameters

url`string`

  Base URL of the server to query.

timeout`number`

  How long to wait for the server.

Returns

`webdriver.promise.Promise`

  A promise that will resolve when the server is ready.

### waitForUrl(url, timeout)code »

Polls a URL with GET requests until it returns a 2xx response or the timeout expires.

Parameters

url`string`

  The URL to poll.

timeout`number`

  How long to wait, in milliseconds.

Returns

`webdriver.promise.Promise`

  A promise that will resolve when the URL responds with 2xx.