selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
17 lines • 4 kB
HTML
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>selenium-webdriver/http/util</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></header><main><article><div class="codelink"><a href="source/http/util.js.src.html#l22">View Source</a></div><h1>module selenium-webdriver/http/util</h1><p>Various HTTP utilities.</p>
<h2>Functions</h2><div id="getStatus" class="function"><div><h3>getStatus(<wbr>url)<span class="codelink"><a href="source/http/util.js.src.html#l64">code »</a></span></h3><p>Queries a WebDriver server for its current status.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>url<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Base URL of the server to query.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>></code><dd><p>A promise that resolves with
a hash of the server status.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="waitForServer" class="function"><div><h3>waitForServer(<wbr>url, timeout)<span class="codelink"><a href="source/http/util.js.src.html#l76">code »</a></span></h3><p>Waits for a WebDriver server to be healthy and accepting requests.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>url<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Base URL of the server to query.</p>
<dt>timeout<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>How long to wait for the server.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise that will resolve when the
server is ready.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="waitForUrl" class="function"><div><h3>waitForUrl(<wbr>url, timeout)<span class="codelink"><a href="source/http/util.js.src.html#l109">code »</a></span></h3><p>Polls a URL with GET requests until it returns a 2xx response or the
timeout expires.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>url<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The URL to poll.</p>
<dt>timeout<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>How long to wait, in milliseconds.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise that will resolve when the
URL responds with 2xx.</p>
</dl></div></div></div></div></article><nav><h3><a href="index.html" tabindex="2">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3><span class="selectable" tabindex="2">Modules</span></h3></label><div id="nav-modules-view"></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3><span class="selectable" tabindex="2">Types</span></h3></label><div id="nav-types-view"></div></div><h3><a href="Changes.html" tabindex="2">Changes</a></h3></nav></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer><script src="types.js"></script><script src="dossier.js"></script>