UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

15 lines 5.27 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>Error</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_error.html">selenium-webdriver/error</a></div><div class="codelink"><a href="source/error.js.src.html#l24">View Source</a></div><h1>class Error</h1><pre class="inheritance"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a> &#x2514; Error</pre><dl><dt>Alias for <code><a href="class_bot_Error.html">bot.Error</a></code></dl><p>Represents an error returned from a WebDriver command request.</p> <h3>new Error(<wbr>code, opt_message)</h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>code<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>The error&#39;s status code.</p> <dt>opt_message<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd><p>Optional error message.</p> </dl></div></div><h2>Instance Methods</h2><div id="toString" class="function"><div><h3>toString()<span class="codelink"><a href="source/lib/atoms/error.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/String">string</a></code><dd><p>The string representation of this error.</p> </dl></div></div></div></div><h2>Instance Properties</h2><div id="code" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l82">code</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>This error&#39;s status code.</p> </dl></div><div id="description" class="property"><dl><dt>description<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>IE-only.</p> </dl></div><div id="fileName" class="property"><dl><dt>fileName<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Mozilla-only</p> </dl></div><div id="isAutomationError" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l194">isAutomationError</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Flag used for duck-typing when this code is embedded in a Firefox extension. This is required since an Error thrown in one component and then reported to another will fail instanceof checks in the second component.</p> </dl></div><div id="lineNumber" class="property"><dl><dt>lineNumber<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>Mozilla-only.</p> </dl></div><div id="message" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l89">message</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>No description.</dl></div><div id="name" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l104">name</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>No description.</dl></div><div id="sourceURL" class="property"><dl><dt>sourceURL<code>?</code><dd><p>Doesn&#39;t seem to exist, but closure/debug.js references it.</p> </dl></div><div id="stack" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l112">stack</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>No description.</dl></div><div id="state" class="property"><dl><dt><a href="source/lib/atoms/error.js.src.html#l85">state</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>No description.</dl></div><h2>Types</h2><dl><dt><a href="enum_bot_Error_State.html">Error.State</a><dd><p>Status strings enumerated in the W3C WebDriver protocol.</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>