UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

23 lines 4.66 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>selenium-webdriver/_base</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="codelink"><a href="source/_base.js.src.html#l31">View Source</a></div><h1>module selenium-webdriver/_base</h1><p>The base module responsible for bootstrapping the Closure library and providing a means of loading Closure-based modules.</p> <p>Each script loaded by this module will be granted access to this module&#39;s <code>require</code> function; all required non-native modules must be specified relative to <em>this</em> module. </p><p>This module will load all scripts from the &#34;lib&#34; subdirectory, unless the SELENIUM_DEV_MODE environment variable has been set to 1, in which case all scripts will be loaded from the Selenium client containing this script. </p><h2>Functions</h2><div id="exportPublicApi" class="function"><div><h3>exportPublicApi(<wbr>symbol)<span class="codelink"><a href="source/_base.js.src.html#l178">code »</a></span></h3><p>Loads a symbol by name from the protected Closure context and exports its public API to the provided object. This function relies on Closure code conventions to define the public API of an object as those properties whose name does not end with &#34;_&#34;.</p> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>symbol<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The symbol to load. This must resolve to an object.</p> </dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd><p>An object with the exported API.</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 symbol has not been defined or does not resolve to an object.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="isDevMode" class="function"><div><h3>isDevMode()<span class="codelink"><a href="source/_base.js.src.html#l199">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether this script was loaded in dev mode.</p> </dl></div></div></div></div><hr class="fn-sep"><div id="require" class="function"><div><h3>require(<wbr>symbol)<span class="codelink"><a href="source/_base.js.src.html#l200">code »</a></span></h3><p>Loads a symbol by name from the protected Closure context.</p> <div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>symbol<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The symbol to load.</p> </dl></div><div class="fn-details"><div><b>Returns</b></div><p>The loaded symbol, or <code>null</code> if not found.</p> </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 symbol has not been defined.</p> </dl></div></div></div></div><h2>Properties</h2><div id="closure" class="property"><dl><dt><a href="source/_base.js.src.html#l196">closure</a><code>?</code><dd>No description.</dl></div><h2>Types</h2><dl><dt><a href="module_selenium-webdriver__base_class_Context.html">Context</a><dd><p>Maintains a unique context for Closure library-based code.</p> </dl></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>