selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
17 lines • 4.37 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>stacktrace</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.html">selenium-webdriver</a></div><div class="codelink"><a href="source/index.js.src.html#l140">View Source</a></div><h1>namespace stacktrace</h1><dl><dt>Alias for <code><a href="namespace_webdriver_stacktrace.html">webdriver.stacktrace</a></code></dl><h2>Functions</h2><div id="format" class="function"><div><h3>format(<wbr>error)<span class="codelink"><a href="source/lib/webdriver/stacktrace.js.src.html#l552">code »</a></span></h3><p>Formats an error's stack trace.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>error<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></code><dd><p>The error to format.</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/Error">Error</a></code><dd><p>The formatted error.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="get" class="function"><div><h3>get()<span class="codelink"><a href="source/lib/webdriver/stacktrace.js.src.html#l617">code »</a></span></h3><p>Gets the native stack trace if available otherwise follows the call chain.
The generated trace will exclude all frames up to and including the call to
this function.</p>
<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/Array">Array</a><<a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a>></code><dd><p>The frames of the stack trace.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getStack" class="function"><div><h3>getStack(<wbr>error)<span class="codelink"><a href="source/lib/webdriver/stacktrace.js.src.html#l534">code »</a></span></h3><p>Get an error's stack trace with the error string trimmed.
V8 prepends the string representation of an error to its stack trace.
This function trims the string so that the stack trace can be parsed
consistently with the other JS engines.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>error<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></code><dd><p>The error.</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/String">string</a></code><dd><p>The stack trace string.</p>
</dl></div></div></div></div><h2>Properties</h2><div id="BROWSER_SUPPORTED" class="property"><dl><dt><a href="source/lib/webdriver/stacktrace.js.src.html#l87">BROWSER_SUPPORTED</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether the current browser supports stack traces.</p>
</dl></div><h2>Types</h2><dl><dt><a href="class_webdriver_stacktrace_Frame.html">Frame</a><dd><p>Class representing one stack frame.</p>
<dt><a href="class_webdriver_stacktrace_Snapshot.html">Snapshot</a><dd><p>Stores a snapshot of the stack trace at the time this instance was created.</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>