You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
e2e-istanbul/node_modules/selenium-webdriver/docs/module_selenium-webdriver_r...

31 lines
15 KiB

<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>SeleniumServer</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class SeleniumServer</h1><a class="source" href="source/remote/index.js.src.html#l332">code &raquo;</a><pre><code><a href="module_selenium-webdriver_remote_class_DriverService.html">DriverService</a>
&#x2514; SeleniumServer</code></pre></header><section><p>Manages the life and death of the Selenium standalone server. The server
may be obtained from http://selenium-release.storage.googleapis.com/index.html.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">SeleniumServer <span class="args">( jar, options )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>jar: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Path to the Selenium server jar.<dt>options: <code class="type">!SeleniumServer.Options</code><dd>Configuration options for the
server.</dl><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a></code><dd>If an invalid port is specified.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l326">code &raquo;</a><a class="member" name="SeleniumServer.Options">SeleniumServer.Options</a> : <code class="type">{port: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>|!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>&gt;), args: !(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>), jvmArgs: (!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;|!<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/Undefined">undefined</a>), env: (!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>), stdio: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)}</code></div><div>Options for the Selenium server:
<ul>
<li><code >port</code> - The port to start the server on (must be > 0). If the
port is provided as a promise, the service will wait for the promise to
resolve before starting.
<li><code >args</code> - The arguments to pass to the service. If a promise is
provided, the service will wait for it to resolve before starting.
<li><code >jvmArgs</code> - The arguments to pass to the JVM. If a promise is
provided, the service will wait for it to resolve before starting.
<li><code >env</code> - The environment variables that should be visible to the
server process. Defaults to inheriting the current process's
environment.
<li><code >stdio</code> - IO configuration for the spawned server process. For
more information, refer to the documentation of
<code >child_process.spawn</code>.
</ul></div></summary></details></div></div></section><section id="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/remote/index.js.src.html#l134">code &raquo;</a><span class="member"><a name="address">address</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that resolves to
the server's address.</dl><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a></code><dd>If the server has not been started.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/remote/index.js.src.html#l145">code &raquo;</a><span class="member"><a name="isRunning">isRunning</a> <span class="args">( )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Whether the underlying service process is running.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/remote/index.js.src.html#l228">code &raquo;</a><span class="member"><a name="kill">kill</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Stops the service if it is not currently running. This function will kill
the server immediately. To synchronize with the active control flow, use
<code class="type"><a class="unresolved-link">#stop()</a></code>.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved when
the server has been stopped.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/remote/index.js.src.html#l159">code &raquo;</a><span class="member"><a name="start">start</a> <span class="args">( opt_timeoutMs )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Starts the server if it is not already running.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_timeoutMs: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd>How long to wait, in milliseconds, for the
server to start accepting requests. Defaults to 30 seconds.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve
to the server's base URL when it has started accepting requests. If the
timeout expires before the server has started, the promise will be
rejected.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/remote/index.js.src.html#l258">code &raquo;</a><span class="member"><a name="stop">stop</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a task in the current control flow to stop the server if it is
currently running.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved when
the server has been stopped.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l118">code &raquo;</a><span class="member"><a name="address_">address_</a> : <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Promise that resolves to the server's address or null if the server has not
been started.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l88">code &raquo;</a><span class="member"><a name="args_">args_</a> : <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>)</code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l94">code &raquo;</a><span class="member"><a name="env_">env_</a> : <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l77">code &raquo;</a><span class="member"><a name="executable_">executable_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l80">code &raquo;</a><span class="member"><a name="loopbackOnly_">loopbackOnly_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l91">code &raquo;</a><span class="member"><a name="path_">path_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l83">code &raquo;</a><span class="member"><a name="port_">port_</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>|!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>&gt;)</code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l110">code &raquo;</a><span class="member"><a name="process_">process_</a> : <code class="type">child_process.ChildProcess</code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l126">code &raquo;</a><span class="member"><a name="shutdownHook_">shutdownHook_</a> : <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Promise that tracks the status of shutting down the server, or null if the
server is not currently shutting down.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l97">code &raquo;</a><span class="member"><a name="stdio_">stdio_</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>)</code></span></div></summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/remote/index.js.src.html#l274">code &raquo;</a><span class="member"><a name="SeleniumServer.superClass_">SeleniumServer.superClass_</a> : <code class="type"><a href="module_selenium-webdriver_remote_class_DriverService.html">DriverService.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>