gecko-dev/testing/marionette/doc/element.html
Andreas Tolfsen 8188694805 Bug 1384517 - Generate Marionette server API docs; r=automatedtester
This is automatically generated from `./mach marionette doc`.

MozReview-Commit-ID: JpCfM1LGUnh

--HG--
extra : rebase_source : 65ae61df148dad2afa60f234fc41fbab1acaf206
2017-07-26 15:05:37 +01:00

3497 lines
50 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: element</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Namespace: element</h1>
<section>
<header>
<h2>element</h2>
</header>
<article>
<div class="container-overview">
<div class="description"><p>This module provides shared functionality for dealing with DOM-
and web elements in Marionette.</p>
<p>A web element is an abstraction used to identify an element when it
is transported across the protocol, between remote- and local ends.</p>
<p>Each element has an associated web element reference (a UUID) that
uniquely identifies the the element across all browsing contexts. The
web element reference for every element representing the same element
is the same.</p>
<p>The <a href="element.Store.html"><code>element.Store</code></a> provides a mapping between web element
references and DOM elements for each browsing context. It also provides
functionality for looking up and retrieving elements.</p></div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line51">line 51</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="element.Store.html">Store</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".coordinates"><span class="type-signature">(static) </span>coordinates<span class="signature">(node, xOffset<span class="signature-attributes">opt</span>, yOffset<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, number>}</span></h4>
<div class="description">
<p>This function generates a pair of coordinates relative to the viewport
given a target element and coordinates relative to that element's
top-left corner.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type">Node</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Target node.</p></td>
</tr>
<tr>
<td class="name"><code>xOffset</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Horizontal offset relative to target's top-left corner.
Defaults to the centre of the target's bounding box.</p></td>
</tr>
<tr>
<td class="name"><code>yOffset</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Vertical offset relative to target's top-left corner. Defaults to
the centre of the target's bounding box.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line695">line 695</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p>TypeError
If |xOffset| or |yOffset| are not numbers.</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>X- and Y coordinates.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object.&lt;string, number></span>
</dd>
</dl>
<h4 class="name" id=".find"><span class="type-signature">(static) </span>find<span class="signature">(container, strategy, selector, opts)</span><span class="type-signature"> &rarr; {Promise.&lt;(nsIDOMElement|Array.&lt;nsIDOMElement>)>}</span></h4>
<div class="description">
<p>Find a single element or a collection of elements starting at the
document root or a given node.</p>
<p>If |timeout| is above 0, an implicit search technique is used.
This will wait for the duration of |timeout| for the element
to appear in the DOM.</p>
<p>See the |element.Strategy| enum for a full list of supported
search strategies that can be passed to |strategy|.</p>
<p>Available flags for |opts|:</p>
<pre class="prettyprint source"><code>|all|
If true, a multi-element search selector is used and a sequence
of elements will be returned. Otherwise a single element.
|timeout|
Duration to wait before timing out the search. If |all| is
false, a NoSuchElementError is thrown if unable to find
the element within the timeout duration.
|startNode|
Element to use as the root of the search.</code></pre>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>container</code></td>
<td class="type">
<span class="param-type">Object.&lt;string, Window></span>
</td>
<td class="description last"><p>Window object and an optional shadow root that contains the
root shadow DOM element.</p></td>
</tr>
<tr>
<td class="name"><code>strategy</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Search strategy whereby to locate the element(s).</p></td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Selector search pattern. The selector must be compatible with
the chosen search |strategy|.</p></td>
</tr>
<tr>
<td class="name"><code>opts</code></td>
<td class="type">
<span class="param-type">Object.&lt;string, ?></span>
</td>
<td class="description last"><p>Options.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line254">line 254</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<p>InvalidSelectorError
If |strategy| is unknown.</p>
</div>
</li>
<li>
<div class="param-desc">
<p>InvalidSelectorError
If |selector| is malformed.</p>
</div>
</li>
<li>
<div class="param-desc">
<p>NoSuchElementError
If a single element is requested, this error will throw if the
element is not found.</p>
</div>
</li>
</ul>
<h5>Returns:</h5>
<div class="param-desc">
<p>Single element or a sequence of elements.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;(nsIDOMElement|Array.&lt;nsIDOMElement>)></span>
</dd>
</dl>
<h4 class="name" id=".findByLinkText"><span class="type-signature">(static) </span>findByLinkText<span class="signature">(node, s)</span><span class="type-signature"> &rarr; {Array.&lt;DOMAnchorElement>}</span></h4>
<div class="description">
<p>Find all hyperlinks dscendant of |node| which link text is |s|.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Where in the DOM hierarchy to being searching.</p></td>
</tr>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Link text to search for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line395">line 395</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Sequence of link elements which text is |s|.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;DOMAnchorElement></span>
</dd>
</dl>
<h4 class="name" id=".findByPartialLinkText"><span class="type-signature">(static) </span>findByPartialLinkText<span class="signature">(node, s)</span><span class="type-signature"> &rarr; {Array.&lt;DOMAnchorElement>}</span></h4>
<div class="description">
<p>Find all hyperlinks descendant of |node| which link text contains |s|.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>node</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Where in the DOM hierachy to begin searching.</p></td>
</tr>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Link text to search for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line410">line 410</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Sequence of link elements which text containins |s|.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;DOMAnchorElement></span>
</dd>
</dl>
<h4 class="name" id=".findByXPath"><span class="type-signature">(static) </span>findByXPath<span class="signature">(root, startNode, expr)</span><span class="type-signature"> &rarr; {DOMElement}</span></h4>
<div class="description">
<p>Find a single element by XPath expression.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>root</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Document root</p></td>
</tr>
<tr>
<td class="name"><code>startNode</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Where in the DOM hiearchy to begin searching.</p></td>
</tr>
<tr>
<td class="name"><code>expr</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>XPath search expression.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line353">line 353</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>First element matching expression.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">DOMElement</span>
</dd>
</dl>
<h4 class="name" id=".findByXPathAll"><span class="type-signature">(static) </span>findByXPathAll<span class="signature">(root, startNode, expr)</span><span class="type-signature"> &rarr; {Array.&lt;DOMElement>}</span></h4>
<div class="description">
<p>Find elements by XPath expression.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>root</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Document root.</p></td>
</tr>
<tr>
<td class="name"><code>startNode</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Where in the DOM hierarchy to begin searching.</p></td>
</tr>
<tr>
<td class="name"><code>expr</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>XPath search expression.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line372">line 372</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Sequence of found elements matching expression.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;DOMElement></span>
</dd>
</dl>
<h4 class="name" id=".getContainer"><span class="type-signature">(static) </span>getContainer<span class="signature">(el)</span><span class="type-signature"> &rarr; {Element}</span></h4>
<div class="description">
<p>Gets the element's container element.</p>
<p>An element container is defined by the WebDriver
specification to be an <option> element in a valid element context
(https://html.spec.whatwg.org/#concept-element-contexts), meaning
that it has an ancestral element that is either <datalist> or <select>.</p>
<p>If the element does not have a valid context, its container element
is itself.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">Element</span>
</td>
<td class="description last"><p>Element to get the container of.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line765">line 765</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Container element of |el|.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Element</span>
</dd>
</dl>
<h4 class="name" id=".getInViewCentrePoint"><span class="type-signature">(static) </span>getInViewCentrePoint<span class="signature">(rect, win)</span><span class="type-signature"> &rarr; {Map.&lt;string, number>}</span></h4>
<div class="description">
<p>Calculate the in-view centre point of the area of the given DOM client
rectangle that is inside the viewport.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rect</code></td>
<td class="type">
<span class="param-type">DOMRect</span>
</td>
<td class="description last"><p>Element off a DOMRect sequence produced by calling |getClientRects|
on a |DOMElement|.</p></td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">nsIDOMWindow</span>
</td>
<td class="description last"><p>Current browsing context.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line889">line 889</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>X and Y coordinates that denotes the in-view centre point of |rect|.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Map.&lt;string, number></span>
</dd>
</dl>
<h4 class="name" id=".getPointerInteractablePaintTree"><span class="type-signature">(static) </span>getPointerInteractablePaintTree<span class="signature">(el)</span><span class="type-signature"> &rarr; {Array.&lt;DOMElement>}</span></h4>
<div class="description">
<p>Produces a pointer-interactable elements tree from a given element.</p>
<p>The tree is defined by the paint order found at the centre point of
the element's rectangle that is inside the viewport, excluding the size
of any rendered scrollbars.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Element to determine if is pointer-interactable.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line920">line 920</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Sequence of elements in paint order.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;DOMElement></span>
</dd>
</dl>
<h4 class="name" id=".inViewport"><span class="type-signature">(static) </span>inViewport<span class="signature">(el, x<span class="signature-attributes">opt</span>, y<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>This function returns true if the node is in the viewport.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">Element</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Target element.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Horizontal offset relative to target. Defaults to the centre of
the target's bounding box.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Vertical offset relative to target. Defaults to the centre of
the target's bounding box.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line732">line 732</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if if |el| is in viewport, false otherwise.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isBooleanAttribute"><span class="type-signature">(static) </span>isBooleanAttribute<span class="signature">(el, attr)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>Tests if the attribute is a boolean attribute on element.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Element to test if |attr| is a boolean attribute on.</p></td>
</tr>
<tr>
<td class="name"><code>attr</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Attribute to test is a boolean attribute.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line1015">line 1015</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if the attribute is boolean, false otherwise.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isCollection"><span class="type-signature">(static) </span>isCollection<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Determines if |obj| is an HTML or JS collection.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line591">line 591</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".isDisconnected"><span class="type-signature">(static) </span>isDisconnected<span class="signature">(el, container)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>Check if the element is detached from the current frame as well as
the optional shadow root (when inside a Shadow DOM context).</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">nsIDOMElement</span>
</td>
<td class="description last"><p>Element to be checked.</p></td>
</tr>
<tr>
<td class="name"><code>container</code></td>
<td class="type">
<span class="param-type">Container</span>
</td>
<td class="description last"><p>Container with |frame|, which is the window object that contains
the element, and an optional |shadowRoot|.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line648">line 648</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Flag indicating that the element is disconnected.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isInView"><span class="type-signature">(static) </span>isInView<span class="signature">(el)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>An element is in view if it is a member of its own pointer-interactable
paint tree.</p>
<p>This means an element is considered to be in view, but not necessarily
pointer-interactable, if it is found somewhere in the
|elementsFromPoint| list at |el|'s in-view centre coordinates.</p>
<p>Before running the check, we change |el|'s pointerEvents style property
to &quot;auto&quot;, since elements without pointer events enabled do not turn
up in the paint tree we get from document.elementsFromPoint. This is
a specialisation that is only relevant when checking if the element is
in view.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">Element</span>
</td>
<td class="description last"><p>Element to check if is in view.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line807">line 807</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if |el| is inside the viewport, or false otherwise.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isObscured"><span class="type-signature">(static) </span>isObscured<span class="signature">(el)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>A pointer-interactable element is defined to be the first
non-transparent element, defined by the paint order found at the centre
point of its rectangle that is inside the viewport, excluding the size
of any rendered scrollbars.</p>
<p>An element is obscured if the pointer-interactable paint tree at its
centre point is empty, or the first element in this tree is not an
inclusive descendant of itself.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Element determine if is pointer-interactable.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line871">line 871</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if element is obscured, false otherwise.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isVisible"><span class="type-signature">(static) </span>isVisible<span class="signature">(el, x<span class="signature-attributes">opt</span>, y<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>This function throws the visibility of the element error if the element is
not displayed or the given coordinates are not within the viewport.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">Element</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Element to check if visible.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Horizontal offset relative to target. Defaults to the centre of
the target's bounding box.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Vertical offset relative to target. Defaults to the centre of
the target's bounding box.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line834">line 834</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if visible, false otherwise.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isWebElementReference"><span class="type-signature">(static) </span>isWebElementReference<span class="signature">(ref)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
<p>Checks if |ref| has either |element.Key| or |element.LegacyKey|
as properties.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>ref</code></td>
<td class="type">
<span class="param-type">Object.&lt;string, string></span>
</td>
<td class="description last"><p>Object that represents a web element reference.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line624">line 624</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>True if |ref| has either expected property.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".scrollIntoView"><span class="type-signature">(static) </span>scrollIntoView<span class="signature">(el)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Attempts to scroll into view |el|.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>el</code></td>
<td class="type">
<span class="param-type">DOMElement</span>
</td>
<td class="description last"><p>Element to scroll into view.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="element.js.html">element.js</a>, <a href="element.js.html#line962">line 962</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="accessibility.Checks.html">Checks</a></li><li><a href="action.Action.html">Action</a></li><li><a href="action.html#.Chain">Chain</a></li><li><a href="action.InputState.Key.html">Key</a></li><li><a href="action.InputState.Null.html">Null</a></li><li><a href="action.InputState.Pointer.html">Pointer</a></li><li><a href="action.Key.html">Key</a></li><li><a href="action.Mouse.html">Mouse</a></li><li><a href="action.PointerParameters.html">PointerParameters</a></li><li><a href="action.Sequence.html">Sequence</a></li><li><a href="AsyncChromeSender.html">AsyncChromeSender</a></li><li><a href="browser.Context.html">Context</a></li><li><a href="browser.Windows.html">Windows</a></li><li><a href="Command.html">Command</a></li><li><a href="DebuggerTransport.html">DebuggerTransport</a></li><li><a href="element.Store.html">Store</a></li><li><a href="ElementClickInterceptedError.html">ElementClickInterceptedError</a></li><li><a href="ElementNotAccessibleError.html">ElementNotAccessibleError</a></li><li><a href="ElementNotInteractableError.html">ElementNotInteractableError</a></li><li><a href="evaluate.this.Sandboxes.html">this.Sandboxes</a></li><li><a href="frame.Manager.html">Manager</a></li><li><a href="GeckoDriver.html">GeckoDriver</a></li><li><a href="InputState.html">InputState</a></li><li><a href="InsecureCertificateError.html">InsecureCertificateError</a></li><li><a href="InvalidArgumentError.html">InvalidArgumentError</a></li><li><a href="JavaScriptError.html">JavaScriptError</a></li><li><a href="Message.html">Message</a></li><li><a href="modal.Dialog.html">Dialog</a></li><li><a href="Packet.html">Packet</a></li><li><a href="proxy.AsyncMessageChannel.html">AsyncMessageChannel</a></li><li><a href="proxy.SyncChromeSender.html">SyncChromeSender</a></li><li><a href="reftest.Runner.html">Runner</a></li><li><a href="Response.html">Response</a></li><li><a href="server.TCPConnection.html">TCPConnection</a></li><li><a href="server.TCPListener.html">TCPListener</a></li><li><a href="session.Capabilities.html">Capabilities</a></li><li><a href="session.Proxy.html">Proxy</a></li><li><a href="session.Timeouts.html">Timeouts</a></li><li><a href="StreamCopier.html">StreamCopier</a></li><li><a href="WebDriverError.html">WebDriverError</a></li></ul><h3>Namespaces</h3><ul><li><a href="accessibility.html">accessibility</a></li><li><a href="action.html">action</a></li><li><a href="addon.html">addon</a></li><li><a href="assert.html">assert</a></li><li><a href="atom.html">atom</a></li><li><a href="browser.html">browser</a></li><li><a href="capture.html">capture</a></li><li><a href="cert.html">cert</a></li><li><a href="cookie.html">cookie</a></li><li><a href="driver.html">driver</a></li><li><a href="element.html">element</a></li><li><a href="error.html">error</a></li><li><a href="evaluate.html">evaluate</a></li><li><a href="global.html#event">event</a></li><li><a href="frame.html">frame</a></li><li><a href="interaction.html">interaction</a></li><li><a href="l10n.html">l10n</a></li><li><a href="legacyaction.html">legacyaction</a></li><li><a href="modal.html">modal</a></li><li><a href="navigate.html">navigate</a></li><li><a href="proxy.html">proxy</a></li><li><a href="reftest.html">reftest</a></li><li><a href="server.html">server</a></li><li><a href="session.html">session</a></li><li><a href="wait.html">wait</a></li></ul><h3>Global</h3><ul><li><a href="global.html#actionChain">actionChain</a></li><li><a href="global.html#addMessageListenerId">addMessageListenerId</a></li><li><a href="global.html#BulkPacket">BulkPacket</a></li><li><a href="global.html#cancelRequest">cancelRequest</a></li><li><a href="global.html#CHECKED_PROPERTY_SUPPORTED_XUL">CHECKED_PROPERTY_SUPPORTED_XUL</a></li><li><a href="global.html#checkExpectedEvent_">checkExpectedEvent_</a></li><li><a href="global.html#ChildDebuggerTransport">ChildDebuggerTransport</a></li><li><a href="global.html#clearElement">clearElement</a></li><li><a href="global.html#clickElement">clickElement</a></li><li><a href="global.html#COMMON_FORM_CONTROLS">COMMON_FORM_CONTROLS</a></li><li><a href="global.html#Cookie">Cookie</a></li><li><a href="global.html#copyStream">copyStream</a></li><li><a href="global.html#createATouch">createATouch</a></li><li><a href="global.html#deleteSession">deleteSession</a></li><li><a href="global.html#delimitedRead">delimitedRead</a></li><li><a href="global.html#DISABLED_ATTRIBUTE_SUPPORTED_XUL">DISABLED_ATTRIBUTE_SUPPORTED_XUL</a></li><li><a href="global.html#dispatchKeyDown">dispatchKeyDown</a></li><li><a href="global.html#dispatchKeyUp">dispatchKeyUp</a></li><li><a href="global.html#dispatchPause">dispatchPause</a></li><li><a href="global.html#dispatchPointerDown">dispatchPointerDown</a></li><li><a href="global.html#dispatchPointerMove">dispatchPointerMove</a></li><li><a href="global.html#dispatchPointerUp">dispatchPointerUp</a></li><li><a href="global.html#filterLinks">filterLinks</a></li><li><a href="global.html#findElement">findElement</a></li><li><a href="global.html#findElementContent">findElementContent</a></li><li><a href="global.html#findElements">findElements</a></li><li><a href="global.html#findElementsContent">findElementsContent</a></li><li><a href="global.html#focusElement">focusElement</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#getActiveElement">getActiveElement</a></li><li><a href="global.html#getElementRect">getElementRect</a></li><li><a href="global.html#getElementTagName">getElementTagName</a></li><li><a href="global.html#getElementText">getElementText</a></li><li><a href="global.html#getElementValueOfCssProperty">getElementValueOfCssProperty</a></li><li><a href="global.html#getOuterWindowId">getOuterWindowId</a></li><li><a href="global.html#getPageSource">getPageSource</a></li><li><a href="global.html#goBack">goBack</a></li><li><a href="global.html#goForward">goForward</a></li><li><a href="global.html#hex">hex</a></li><li><a href="global.html#INPUT_TYPES_NO_EVENT">INPUT_TYPES_NO_EVENT</a></li><li><a href="global.html#isElementDisplayed">isElementDisplayed</a></li><li><a href="global.html#isElementEnabled">isElementEnabled</a></li><li><a href="global.html#isElementSelected">isElementSelected</a></li><li><a href="global.html#JSONPacket">JSONPacket</a></li><li><a href="global.html#KEY_LOCATION_LOOKUP">KEY_LOCATION_LOOKUP</a></li><li><a href="global.html#loadListener">loadListener</a></li><li><a href="global.html#LocalDebuggerTransport">LocalDebuggerTransport</a></li><li><a href="global.html#MessageOrigin">MessageOrigin</a></li><li><a href="global.html#MODIFIER_NAME_LOOKUP">MODIFIER_NAME_LOOKUP</a></li><li><a href="global.html#multiAction">multiAction</a></li><li><a href="global.html#newSession">newSession</a></li><li><a href="global.html#NORMALIZED_KEY_LOOKUP">NORMALIZED_KEY_LOOKUP</a></li><li><a href="global.html#performActions">performActions</a></li><li><a href="global.html#RawPacket">RawPacket</a></li><li><a href="global.html#refresh">refresh</a></li><li><a href="global.html#registerSelf">registerSelf</a></li><li><a href="global.html#releaseActions">releaseActions</a></li><li><a href="global.html#removeMessageListenerId">removeMessageListenerId</a></li><li><a href="global.html#resetValues">resetValues</a></li><li><a href="global.html#ResponseBody">ResponseBody</a></li><li><a href="global.html#restart">restart</a></li><li><a href="global.html#SELECTED_PROPERTY_SUPPORTED_XUL">SELECTED_PROPERTY_SUPPORTED_XUL</a></li><li><a href="global.html#sendError">sendError</a></li><li><a href="global.html#sendOk">sendOk</a></li><li><a href="global.html#sendResponse">sendResponse</a></li><li><a href="global.html#sendToServer">sendToServer</a></li><li><a href="global.html#set">set</a></li><li><a href="global.html#singleTap">singleTap</a></li><li><a href="global.html#sleepSession">sleepSession</a></li><li><a href="global.html#startListeners">startListeners</a></li><li><a href="global.html#switchToFrame">switchToFrame</a></li><li><a href="global.html#switchToParentFrame">switchToParentFrame</a></li><li><a href="global.html#switchToShadowRoot">switchToShadowRoot</a></li><li><a href="global.html#takeScreenshot">takeScreenshot</a></li><li><a href="global.html#toEvents">toEvents</a></li><li><a href="global.html#waitForPageLoaded">waitForPageLoaded</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.3</a> on Wed Jul 26 2017 14:55:00 GMT+0100 (BST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>