selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
35 lines • 7.62 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>ServiceBuilder</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="parentlink"><b>Module:</b> <a href="module_selenium-webdriver_opera.html">selenium-webdriver/opera</a></div><div class="codelink"><a href="source/opera.js.src.html#l497">View Source</a></div><h1>class ServiceBuilder</h1><p>Creates <code>remote.DriverService</code> instances that manages an
<a href="https://github.com/operasoftware/operachromiumdriver">OperaDriver</a>
server in a child process.</p>
<h3>new ServiceBuilder(<wbr>opt_exe)</h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>opt_exe<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd><p>Path to the server executable to use. If omitted,
the builder will attempt to locate the operadriver on the current
PATH.</p>
</dl></div><div class="fn-details"><div><b>Throws</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></code><dd><p>If provided executable does not exist, or the operadriver
cannot be found on the PATH.</p>
</dl></div></div><h2>Instance Methods</h2><div id="build" class="function"><div><h3>build()<span class="codelink"><a href="source/opera.js.src.html#l218">code »</a></span></h3><p>Creates a new DriverService using this instance's current configuration.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_remote_class_DriverService.html">DriverService</a></code><dd><p>A new driver service using this instance's
current configuration.</p>
</dl></div><div class="fn-details"><div><b>Throws</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></code><dd><p>If the driver exectuable was not specified and a default
could not be found on the current PATH.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="enableVerboseLogging" class="function"><div><h3>enableVerboseLogging()<span class="codelink"><a href="source/opera.js.src.html#l170">code »</a></span></h3><p>Enables verbose logging.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="loggingTo" class="function"><div><h3>loggingTo(<wbr>path)<span class="codelink"><a href="source/opera.js.src.html#l160">code »</a></span></h3><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.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>path<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Path of the log file to use.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setStdio" class="function"><div><h3>setStdio(<wbr>config)<span class="codelink"><a href="source/opera.js.src.html#l193">code »</a></span></h3><p>Defines the stdio configuration for the driver service. See
<code>child_process.spawn</code> for more information.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>config<code>(<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/Array">Array</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/Number">number</a>|Stream)>)</code><dd><p>The
configuration to use.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="silent" class="function"><div><h3>silent()<span class="codelink"><a href="source/opera.js.src.html#l180">code »</a></span></h3><p>Silence sthe drivers output.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="usingPort" class="function"><div><h3>usingPort(<wbr>port)<span class="codelink"><a href="source/opera.js.src.html#l145">code »</a></span></h3><p>Sets the port to start the OperaDriver on.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>port<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>The port to use, or 0 for any free port.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</p>
</dl></div><div class="fn-details"><div><b>Throws</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></code><dd><p>If the port is invalid.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="withEnvironment" class="function"><div><h3>withEnvironment(<wbr>env)<span class="codelink"><a href="source/opera.js.src.html#l205">code »</a></span></h3><p>Defines the environment to start the server under. This settings will be
inherited by every browser session started by the server.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>env<code><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><p>The environment to use.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="module_selenium-webdriver_opera_class_ServiceBuilder.html">ServiceBuilder</a></code><dd><p>A self reference.</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>