gecko-dev/testing/marionette/doc/api/action.html
Andreas Tolfsen 823d5e70fb Bug 1405757 - Regenerate Marionette API docs. r=me
DONTBUILD

MozReview-Commit-ID: I6l7SfrE2W4
2017-10-04 18:35:12 +01:00

1607 lines
28 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: action</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: action</h1>
<section>
<header>
<h2>action</h2>
</header>
<article>
<div class="container-overview">
<div class="description"><p>Implements WebDriver Actions API: a low-level interface for providing
virtualised device input to the web browser.</p></div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line32">line 32</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="action.Action.html">Action</a></dt>
<dd></dd>
<dt><a href="action.html#.Chain">Chain</a></dt>
<dd></dd>
<dt><a href="action.Key.html">Key</a></dt>
<dd></dd>
<dt><a href="action.Mouse.html">Mouse</a></dt>
<dd></dd>
<dt><a href="action.PointerParameters.html">PointerParameters</a></dt>
<dd></dd>
<dt><a href="action.Sequence.html">Sequence</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".InputState"><span class="type-signature">(static) </span>InputState<span class="type-signature"></span></h4>
<div class="description">
<p>Possible kinds of |InputState| for supported input sources.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line476">line 476</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".inputStateMap"><span class="type-signature">(static) </span>inputStateMap<span class="type-signature"></span></h4>
<div class="description">
<p>Input state associated with current session. This is a map between
input ID and the device state for that input source, with one entry
for each active input source.</p>
<p>Initialized in listener.js.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line405">line 405</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".inputsToCancel"><span class="type-signature">(static) </span>inputsToCancel<span class="type-signature"></span></h4>
<div class="description">
<p>List of <a href="action.Action.html"><code>action.Action</code></a> associated with current session. Used to
manage dispatching events when resetting the state of the input sources.
Reset operations are assumed to be idempotent.</p>
<p>Initialized in listener.js</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line414">line 414</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".PointerOrigin"><span class="type-signature">(static) </span>PointerOrigin<span class="type-signature"></span></h4>
<div class="description">
<p>Represents possible values for a pointer-move origin.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line339">line 339</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".PointerType"><span class="type-signature">(static) </span>PointerType<span class="type-signature"></span></h4>
<div class="description">
<p>Represents possible subtypes for a pointer input source.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line373">line 373</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".Chain"><span class="type-signature">(static) </span>Chain<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Functionality for (single finger) action chains.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="legacyaction.js.html">legacyaction.js</a>, <a href="legacyaction.js.html#line27">line 27</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".computePointerDestination"><span class="type-signature">(static) </span>computePointerDestination<span class="signature">(a, inputState, center<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Map.&lt;string, number>}</span></h4>
<div class="description">
<p>Compute viewport coordinates of pointer target based on given origin.</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>a</code></td>
<td class="type">
<span class="param-type"><a href="action.Action.html">action.Action</a></span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Action that specifies pointer origin and x and y coordinates of target.</p></td>
</tr>
<tr>
<td class="name"><code>inputState</code></td>
<td class="type">
<span class="param-type"><a href="action.html#.InputState">action.InputState</a></span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Input state that specifies current x and y coordinates of pointer.</p></td>
</tr>
<tr>
<td class="name"><code>center</code></td>
<td class="type">
<span class="param-type">Map.&lt;string, number></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Object representing x and y coordinates of an element center-point.
This is only used if |a.origin| is 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="action.js.html">action.js</a>, <a href="action.js.html#line1059">line 1059</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>x and y coordinates of pointer destination.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Map.&lt;string, number></span>
</dd>
</dl>
<h4 class="name" id=".computeTickDuration"><span class="type-signature">(static) </span>computeTickDuration<span class="signature">(tickActions)</span><span class="type-signature"> &rarr; {number}</span></h4>
<div class="description">
<p>Compute tick duration in milliseconds for a collection of actions.</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>tickActions</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="action.Action.html">action.Action</a>></span>
</td>
<td class="description last"><p>List of actions for one tick.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line1033">line 1033</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Longest action duration in |tickActions| if any, or 0.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".dispatch"><span class="type-signature">(static) </span>dispatch<span class="signature">(chain, seenEls, window)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
<p>Dispatch a chain of actions over |chain.length| ticks.</p>
<p>This is done by creating a Promise for each tick that resolves once
all the Promises for individual tick-actions are resolved. The next
tick's actions are not dispatched until the Promise for the current
tick is resolved.</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>chain</code></td>
<td class="type">
<span class="param-type"><a href="action.html#.Chain">action.Chain</a></span>
</td>
<td class="description last"><p>Actions grouped by tick; each element in |chain| is a sequence of
actions for one tick.</p></td>
</tr>
<tr>
<td class="name"><code>seenEls</code></td>
<td class="type">
<span class="param-type"><a href="element.Store.html">element.Store</a></span>
</td>
<td class="description last"><p>Element store.</p></td>
</tr>
<tr>
<td class="name"><code>window</code></td>
<td class="type">
<span class="param-type">WindowProxy</span>
</td>
<td class="description last"><p>Current window global.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line980">line 980</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Promise for dispatching all actions in |chain|.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id=".dispatchTickActions"><span class="type-signature">(static) </span>dispatchTickActions<span class="signature">(tickActions, tickDuration, seenEls, window)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
<p>Dispatch sequence of actions for one tick.</p>
<p>This creates a Promise for one tick that resolves once the Promise
for each tick-action is resolved, which takes at least |tickDuration|
milliseconds. The resolved set of events for each tick is followed by
firing of pending DOM events.</p>
<p>Note that the tick-actions are dispatched in order, but they may have
different durations and therefore may not end in the same order.</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>tickActions</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="action.Action.html">action.Action</a>></span>
</td>
<td class="description last"><p>List of actions for one tick.</p></td>
</tr>
<tr>
<td class="name"><code>tickDuration</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Duration in milliseconds of this tick.</p></td>
</tr>
<tr>
<td class="name"><code>seenEls</code></td>
<td class="type">
<span class="param-type"><a href="element.Store.html">element.Store</a></span>
</td>
<td class="description last"><p>Element store.</p></td>
</tr>
<tr>
<td class="name"><code>window</code></td>
<td class="type">
<span class="param-type">WindowProxy</span>
</td>
<td class="description last"><p>Current window global.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line1016">line 1016</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Promise for dispatching all tick-actions and pending DOM events.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id=".processPointerAction"><span class="type-signature">(static) </span>processPointerAction<span class="signature">(id, pointerParams, act)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Adds <var>pointerType</var> attribute to Action <var>act</var>.</p>
<p>Helper function for <a href="action.Action.html#.fromJSON"><code>action.Action.fromJSON</code></a>.</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>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Input source ID.</p></td>
</tr>
<tr>
<td class="name"><code>pointerParams</code></td>
<td class="type">
<span class="param-type">action.PointerParams</span>
</td>
<td class="description last"><p>Input source pointer parameters.</p></td>
</tr>
<tr>
<td class="name"><code>act</code></td>
<td class="type">
<span class="param-type"><a href="action.Action.html">action.Action</a></span>
</td>
<td class="description last"><p>Action to be updated.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="action.js.html">action.js</a>, <a href="action.js.html#line890">line 890</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<dl>
<dt>
<div class="param-desc">
<p>If <var>id</var> is already mapped to an
<a href="action.html#.InputState"><code>action.InputState</code></a> that is not compatible with
<code>act.type</code> or <code>pointerParams.pointerType</code>.</p>
</div>
</dt>
<dd></dd>
<dt>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="InvalidArgumentError.html">InvalidArgumentError</a></span>
</dd>
</dl>
</dt>
<dd></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="ContentEventObserverService.html">ContentEventObserverService</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><li><a href="WebElementEventTarget.html">WebElementEventTarget</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#exitFullscreen">exitFullscreen</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#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#pprint">pprint</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#restoreWindow">restoreWindow</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#stack">stack</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#TimedPromise">TimedPromise</a></li><li><a href="global.html#toEvents">toEvents</a></li><li><a href="global.html#waitForPageLoaded">waitForPageLoaded</a></li><li><a href="global.html#whenIdle">whenIdle</a></li><li><a href="global.html#WindowState">WindowState</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 Oct 04 2017 18:33:34 GMT+0100 (BST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>