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.
13 lines
11 KiB
13 lines
11 KiB
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>ServiceBuilder</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class ServiceBuilder</h1><a class="source" href="source/chrome.js.src.html#l469">code »</a></header><section><p>Creates <code class="type"><a class="unresolved-link">remote.DriverService</a></code> instances that manage a ChromeDriver
|
|
server.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">ServiceBuilder <span class="args">( opt_exe )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_exe: <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 server executable to use. If omitted,
|
|
the builder will attempt to locate the chromedriver on the current
|
|
PATH.</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 provided executable does not exist, or the chromedriver
|
|
cannot be found on the PATH.</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/chrome.js.src.html#l173">code »</a><span class="member"><a name="build">build</a> <span class="args">( )</span> ⇒ <code class="type">remote.DriverService</code></span></div><p>Creates a new DriverService using this instance's current configuration.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A new driver service using this instance's
|
|
current configuration.</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 driver exectuable was not specified and a default
|
|
could not be found on the current PATH.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l111">code »</a><span class="member"><a name="enableVerboseLogging">enableVerboseLogging</a> <span class="args">( )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Enables verbose logging.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l101">code »</a><span class="member"><a name="loggingTo">loggingTo</a> <span class="args">( path )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Sets the path of the log file the driver should log to. If a log file is
|
|
not specified, the driver will log to stderr.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>path: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Path of the log file to use.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l123">code »</a><span class="member"><a name="setNumHttpThreads">setNumHttpThreads</a> <span class="args">( n )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Sets the number of threads the driver should use to manage HTTP requests.
|
|
By default, the driver will use 4 threads.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>n: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The number of threads to use.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l148">code »</a><span class="member"><a name="setStdio">setStdio</a> <span class="args">( config )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Defines the stdio configuration for the driver service. See
|
|
<code >child_process.spawn</code> for more information.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>config: <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><dd>The
|
|
configuration to use.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l135">code »</a><span class="member"><a name="setUrlBasePath">setUrlBasePath</a> <span class="args">( path )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Sets the base path for WebDriver REST commands (e.g. "/wd/hub").
|
|
By default, the driver will accept commands relative to "/".</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>path: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The base path to use.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l86">code »</a><span class="member"><a name="usingPort">usingPort</a> <span class="args">( port )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Sets the port to start the ChromeDriver on.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>port: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The port to use, or 0 for any free port.</dl><tr><th>Returns<tr><td><dl>A self reference.</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 port is invalid.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/chrome.js.src.html#l160">code »</a><span class="member"><a name="withEnvironment">withEnvironment</a> <span class="args">( env )</span> ⇒ <code class="type">!ServiceBuilder</code></span></div><p>Defines the environment to start the server under. This settings will be
|
|
inherited by every browser session started by the server.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>env: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>.<<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>></code><dd>The environment to use.</dl><tr><th>Returns<tr><td><dl>A self reference.</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/chrome.js.src.html#l63">code »</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>.<<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/chrome.js.src.html#l77">code »</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>.<<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>></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/chrome.js.src.html#l49">code »</a><span class="member"><a name="exe_">exe_</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/chrome.js.src.html#l69">code »</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></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/chrome.js.src.html#l73">code »</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></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> |