selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
13 lines • 4.09 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>Session</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#l66">View Source</a></div><h1>class Session</h1><dl><dt>Alias for <code><a href="class_webdriver_Session.html">webdriver.Session</a></code></dl><p>Contains information about a WebDriver session.</p>
<h3>new Session(<wbr>id, capabilities)</h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>id<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The session ID.</p>
<dt>capabilities<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd><p>The session
capabilities.</p>
</dl></div></div><h2>Instance Methods</h2><div id="getCapabilities" class="function"><div><h3>getCapabilities()<span class="codelink"><a href="source/lib/webdriver/session.js.src.html#l52">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_Capabilities.html">webdriver.Capabilities</a></code><dd><p>This session's capabilities.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getCapability" class="function"><div><h3>getCapability(<wbr>key)<span class="codelink"><a href="source/lib/webdriver/session.js.src.html#l62">code »</a></span></h3><p>Retrieves the value of a specific capability.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>key<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The capability to retrieve.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><p>The capability value.</p>
</div></div></div></div><hr class="fn-sep"><div id="getId" class="function"><div><h3>getId()<span class="codelink"><a href="source/lib/webdriver/session.js.src.html#l44">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>This session's ID.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="toJSON" class="function"><div><h3>toJSON(<wbr>arg0)<span class="codelink"><a href="source/lib/webdriver/session.js.src.html#l72">code »</a></span></h3><p>Returns the JSON representation of this object, which is just the string
session ID.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>arg0<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code></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 JSON representation of this Session.</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>