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...

19 lines
12 KiB

<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>DriverService</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class DriverService</h1><a class="source" href="source/remote/index.js.src.html#l331">code &raquo;</a></header><section><p>Manages the life and death of a native executable WebDriver server.
<p>It is expected that the driver server implements the
<a href="http://code.google.com/p/selenium/wiki/JsonWireProtocol">WebDriver
Wire Protocol</a>. Furthermore, the managed server should support multiple
concurrent sessions, so that this class may be reused for multiple clients.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">DriverService <span class="args">( executable, options )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>executable: <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 executable to run.<dt>options: <code class="type">!ServiceOptions</code><dd>Configuration options for the service.</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="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#l106">code &raquo;</a><span class="member"><a name="DriverService.DEFAULT_START_TIMEOUT_MS">DriverService.DEFAULT_START_TIMEOUT_MS</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The default amount of time, in milliseconds, to wait for the server to
start.</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>