UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

21 lines 4.91 kB
<!DOCTYPE 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>Binary</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_firefox_binary.html">selenium-webdriver/firefox/binary</a></div><div class="codelink"><a href="source/firefox/binary.js.src.html#l254">View Source</a></div><h1>class Binary</h1><pre class="inheritance"><a href="class_webdriver_Serializable.html">webdriver.Serializable</a> &#x2514; Binary</pre><p>Manages a Firefox subprocess configured for use with WebDriver.</p> <h3>new Binary(<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 Firefox binary to use. If not specified, will attempt to locate Firefox on the current system.</p> </dl></div></div><h2>Instance Methods</h2><div id="addArguments" class="function"><div><h3>addArguments(<wbr>var_args)<span class="codelink"><a href="source/firefox/binary.js.src.html#l172">code »</a></span></h3><p>Add arguments to the command line used to start Firefox.</p> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>var_args<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>&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;)</code><dd><p>Either the arguments to add as varargs, or the arguments as an array.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="kill" class="function"><div><h3>kill()<span class="codelink"><a href="source/firefox/binary.js.src.html#l225">code »</a></span></h3><p>Kills the managed Firefox process.</p> <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 for when the process has terminated.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="launch" class="function"><div><h3>launch(<wbr>profile)<span class="codelink"><a href="source/firefox/binary.js.src.html#l190">code »</a></span></h3><p>Launches Firefox and eturns a promise that will be fulfilled when the process terminates.</p> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>profile<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Path to the profile directory to use.</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 for the process result.</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 this instance has already been started.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="serialize" class="function"><div><h3>serialize()<span class="codelink"><a href="source/firefox/binary.js.src.html#l246">code »</a></span></h3><p>Returns a promise for the wire representation of this binary. Note: the FirefoxDriver only supports passing the path to the binary executable over the wire; all command line arguments and environment variables will be discarded.</p> <p><b>Overrides: </b><a href="class_webdriver_Serializable.html#serialize">webdriver.Serializable</a></p><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 for this binary&#39;s wire representation.</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>