module selenium-webdriver/http/util

Various HTTP utilities.

Functions

getStatus(url)code »

Queries a WebDriver server for its current status.

Parameters
urlstring

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
urlstring

Base URL of the server to query.

timeoutnumber

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
urlstring

The URL to poll.

timeoutnumber

How long to wait, in milliseconds.

Returns
webdriver.promise.Promise

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