--- /dev/null
+<!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>WebElement</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search"></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#l72">View Source</a></div><h1>class WebElement</h1><pre class="inheritance"><a href="class_webdriver_Serializable.html">webdriver.Serializable</a><{ELEMENT: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}>
+ └ WebElement</pre><dl><dt>Alias for <code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></dl><p>Represents a DOM element. WebElements can be found by searching from the document root using a <a href="class_webdriver_WebDriver.html"><code>webdriver.WebDriver</code></a> instance, or by searching under another WebElement:</p>
+<pre><code>driver.get('http://www.google.com');
+var searchForm = driver.findElement(By.tagName('form'));
+var searchBox = searchForm.findElement(By.name('q'));
+searchBox.sendKeys('webdriver');
+</code></pre><p>The WebElement is implemented as a promise for compatibility with the promise API. It will always resolve itself when its internal state has been fully resolved and commands may be issued against the element. This can be used to catch errors when an element cannot be located on the page:</p>
+<pre><code>driver.findElement(By.id('not-there')).then(function(element) {
+ alert('Found an element that was not expected to be there!');
+}, function(error) {
+ alert('The element was not found, as expected');
+});
+</code></pre><h2 class="main">new WebElement(<wbr>driver, id)</h2><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>driver<code><a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code><dd><p>The parent WebDriver instance for this element.</p><dt>id<code>(<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="class_webdriver_WebElement.html#WebElement.Id">webdriver.WebElement.Id</a>>|<a href="class_webdriver_WebElement.html#WebElement.Id">webdriver.WebElement.Id</a>)</code><dd><p>The server-assigned opaque ID for the underlying DOM element.</p></dl></div></div><h2>Instance Methods</h2><div id="clear" class="function"><div><h3>clear()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2169">code »</a></span></h3><p>Schedules a command to clear the <code>value</code> of this element. This command has no effect if the underlying DOM element is neither a text INPUT element nor a TEXTAREA element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>></code><dd><p>A promise that will be resolved when the element has been cleared.</p></dl></div></div></div></div><hr class="fn-sep"><div id="click" class="function"><div><h3>click()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1917">code »</a></span></h3><p>Schedules a command to click on this element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>></code><dd><p>A promise that will be resolved when the click command has completed.</p></dl></div></div></div></div><hr class="fn-sep"><div id="findElement" class="function"><div><h3>findElement(<wbr>locator)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1857">code »</a></span></h3><p>Schedule a command to find a descendant of this element. If the element cannot be found, a <a href="enum_bot_ErrorCode.html#NO_SUCH_ELEMENT"><code>bot.ErrorCode.NO_SUCH_ELEMENT</code></a> result will be returned by the driver. Unlike other commands, this error cannot be suppressed. In other words, scheduling a command to find an element doubles as an assert that the element is present on the page. To test whether an element is present on the page, use <a href="module_selenium-webdriver_class_WebElement.html#isElementPresent"><code>#isElementPresent</code></a> instead.</p><p>The search criteria for an element may be defined using one of the factories in the <a href="namespace_webdriver_By.html"><code>webdriver.By</code></a> namespace, or as a short-hand <a href="namespace_webdriver_By.html#By.Hash"><code>webdriver.By.Hash</code></a> object. For example, the following two statements are equivalent:</p>
+<pre><code>var e1 = element.findElement(By.id('foo'));
+var e2 = element.findElement({id:'foo'});
+</code></pre><p>You may also provide a custom locator function, which takes as input this WebDriver instance and returns a <a href="class_webdriver_WebElement.html"><code>webdriver.WebElement</code></a>, or a promise that will resolve to a WebElement. For example, to find the first visible link on a page, you could write:</p>
+<pre><code>var link = element.findElement(firstVisibleLink);
+
+function firstVisibleLink(element) {
+ var links = element.findElements(By.tagName('a'));
+ return webdriver.promise.filter(links, function(link) {
+ return links.isDisplayed();
+ }).then(function(visibleLinks) {
+ return visibleLinks[0];
+ });
+}
+</code></pre><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>locator<code>(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|{className: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{css: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{id: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{js: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{linkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{partialLinkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{tagName: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{xpath: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>})</code><dd><p>The locator strategy to use when searching for the element.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd><p>A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.</p></dl></div></div></div></div><hr class="fn-sep"><div id="findElements" class="function"><div><h3>findElements(<wbr>locator)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1898">code »</a></span></h3><p>Schedules a command to find all of the descendants of this element that match the given search criteria.</p><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>locator<code>(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|{className: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{css: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{id: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{js: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{linkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{partialLinkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{tagName: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{xpath: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>})</code><dd><p>The locator strategy to use when searching for the elements.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>>></code><dd><p>A promise that will resolve to an array of WebElements.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getAttribute" class="function"><div><h3>getAttribute(<wbr>attributeName)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2075">code »</a></span></h3><p>Schedules a command to query for the value of the given attribute of the element. Will return the current value, even if it has been modified after the page has been loaded. More exactly, this method will return the value of the given attribute, unless that attribute is not present, in which case the value of the property with the same name is returned. If neither value is set, null is returned (for example, the "value" property of a textarea element). The "style" attribute is converted as best can be to a text representation with a trailing semi-colon. The following are deemed to be "boolean" attributes and will return either "true" or null:</p><p>async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, spellcheck, truespeed, willvalidate</p><p>Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:</p>
+<ul><li>"class"</li><li>"readonly"</li></ul><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>attributeName<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The name of the attribute to query.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the attribute's value. The returned value will always be either a string or null.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getCssValue" class="function"><div><h3>getCssValue(<wbr>cssStyleProperty)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2037">code »</a></span></h3><p>Schedules a command to query for the computed style of the element represented by this instance. If the element inherits the named style from its parent, the parent will be queried for its value. Where possible, color values will be converted to their hex representation (e.g. #00ff00 instead of rgb(0, 255, 0)).</p><p><em>Warning:</em> the value returned will be as the browser interprets it, so it may be tricky to form a proper assertion.</p><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>cssStyleProperty<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The name of the CSS style property to look up.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the requested CSS value.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getDriver" class="function"><div><h3>getDriver()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1766">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code><dd><p>The parent driver for this instance.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getId" class="function"><div><h3>getId()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1777">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><{ELEMENT: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}></code><dd><p>A promise that resolves to this element's JSON representation as defined by the WebDriver wire protocol.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getInnerHtml" class="function"><div><h3>getInnerHtml()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2212">code »</a></span></h3><p>Schedules a command to retrieve the inner HTML of this element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the element's inner HTML.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getLocation" class="function"><div><h3>getLocation()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2116">code »</a></span></h3><p>Schedules a command to compute the location of this element in page space.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><{x: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, y: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}></code><dd><p>A promise that will be resolved to the element's location as a <code>{x:number, y:number}</code> object.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getOuterHtml" class="function"><div><h3>getOuterHtml()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2193">code »</a></span></h3><p>Schedules a command to retrieve the outer HTML of this element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the element's outer HTML.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getRawId" class="function"><div><h3>getRawId()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1788">code »</a></span></h3><p>Returns the raw ID string ID for this element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that resolves to this element's raw ID as a string value.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getSize" class="function"><div><h3>getSize()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2103">code »</a></span></h3><p>Schedules a command to compute the size of this element's bounding box, in pixels.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><{height: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, width: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}></code><dd><p>A promise that will be resolved with the element's size as a <code>{width:number, height:number}</code> object.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getTagName" class="function"><div><h3>getTagName()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2015">code »</a></span></h3><p>Schedules a command to query for the tag/node name of this element.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the element's tag name.</p></dl></div></div></div></div><hr class="fn-sep"><div id="getText" class="function"><div><h3>getText()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2089">code »</a></span></h3><p>Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>A promise that will be resolved with the element's visible text.</p></dl></div></div></div></div><hr class="fn-sep"><div id="isDisplayed" class="function"><div><h3>isDisplayed()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2181">code »</a></span></h3><p>Schedules a command to test whether this element is currently displayed.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code><dd><p>A promise that will be resolved with whether this element is currently visible on the page.</p></dl></div></div></div></div><hr class="fn-sep"><div id="isElementPresent" class="function"><div><h3>isElementPresent(<wbr>locator)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1882">code »</a></span></h3><p>Schedules a command to test if there is at least one descendant of this element that matches the given search criteria.</p><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>locator<code>(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|{className: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{css: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{id: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{js: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{linkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{partialLinkText: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{tagName: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}|{xpath: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>})</code><dd><p>The locator strategy to use when searching for the element.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code><dd><p>A promise that will be resolved with whether an element could be located on the page.</p></dl></div></div></div></div><hr class="fn-sep"><div id="isEnabled" class="function"><div><h3>isEnabled()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2129">code »</a></span></h3><p>Schedules a command to query whether the DOM element represented by this instance is enabled, as dicted by the <code>disabled</code> attribute.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code><dd><p>A promise that will be resolved with whether this element is currently enabled.</p></dl></div></div></div></div><hr class="fn-sep"><div id="isSelected" class="function"><div><h3>isSelected()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2141">code »</a></span></h3><p>Schedules a command to query whether this element is selected.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code><dd><p>A promise that will be resolved with whether this element is currently selected.</p></dl></div></div></div></div><hr class="fn-sep"><div id="sendKeys" class="function"><div><h3>sendKeys(<wbr>var_args)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1977">code »</a></span></h3><p>Schedules a command to type a sequence on the DOM element represented by this instance.</p><p>Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is processed in the keysequence, that key state is toggled until one of the following occurs:</p>
+<ul><li>The modifier key is encountered again in the sequence. At this point the state of the key is toggled (along with the appropriate keyup/down events).</li><li><p>The <a href="enum_webdriver_Key.html#NULL"><code>webdriver.Key.NULL</code></a> key is encountered in the sequence. When this key is encountered, all modifier keys current in the down state are released (with accompanying keyup events). The NULL key can be used to simulate common keyboard shortcuts:</p>
+ <pre><code>element.sendKeys("text was",
+ webdriver.Key.CONTROL, "a", webdriver.Key.NULL,
+ "now text is");
+// Alternatively:
+element.sendKeys("text was",
+ webdriver.Key.chord(webdriver.Key.CONTROL, "a"),
+ "now text is");
+</code></pre></li><li><p>The end of the keysequence is encountered. When there are no more keys to type, all depressed modifier keys are released (with accompanying keyup events).</p></li></ul><p>If this element is a file input (<code><input type="file"></code>), the specified key sequence should specify the path to the file to attach to the element. This is analgous to the user clicking "Browse..." and entering the path into the file select dialog.</p>
+<pre><code>var form = driver.findElement(By.css('form'));
+var element = form.findElement(By.css('input[type=file]'));
+element.sendKeys('/path/to/file.txt');
+form.submit();
+</code></pre><p>For uploads to function correctly, the entered path must reference a file on the <em>browser's</em> machine, not the local machine running this script. When running against a remote Selenium server, a <a href="class_webdriver_FileDetector.html"><code>webdriver.FileDetector</code></a> may be used to transparently copy files to the remote machine before attempting to upload them in the browser.</p><p><strong>Note:</strong> On browsers where native keyboard events are not supported (e.g. Firefox on OS X), key events will be synthesized. Special punctionation keys will be synthesized according to a standard QWERTY en-us keyboard layout.</p><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>var_args<code>...(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>)</code><dd><p>The sequence of keys to type. All arguments will be joined into a single sequence.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>></code><dd><p>A promise that will be resolved when all keys have been typed.</p></dl></div></div></div></div><hr class="fn-sep"><div id="serialize" class="function"><div><h3>serialize()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1796">code »</a></span></h3><p><b>Overrides: </b><a href="class_webdriver_Serializable.html#serialize">webdriver.Serializable</a></p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code>(<a href="class_webdriver_WebElement.html#WebElement.Id">webdriver.WebElement.Id</a>|IThenable<<a href="class_webdriver_WebElement.html#WebElement.Id">webdriver.WebElement.Id</a>>)</code></dl></div></div></div></div><hr class="fn-sep"><div id="submit" class="function"><div><h3>submit()<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l2155">code »</a></span></h3><p>Schedules a command to submit the form containing this element (or this element if it is a FORM element). This command is a no-op if the element is not contained in a form.</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>></code><dd><p>A promise that will be resolved when the form has been submitted.</p></dl></div></div></div></div><h2>Static Functions</h2><div id="WebElement.equals" class="function"><div><h3>WebElement.equals(<wbr>a, b)<span class="codelink"><a href="source/lib/webdriver/webdriver.js.src.html#l1741">code »</a></span></h3><p>Compares to WebElements for equality.</p><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>a<code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd><p>A WebElement.</p><dt>b<code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd><p>A WebElement.</p></dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code><dd><p>A promise that will be resolved to whether the two WebElements are equal.</p></dl></div></div></div></div><h2>Static Properties</h2><div id="WebElement.ELEMENT_KEY" class="property"><dl><dt><a href="source/lib/webdriver/webdriver.js.src.html#l1731">WebElement.ELEMENT_KEY</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The property key used in the wire protocol to indicate that a JSON object contains the ID of a WebElement.</p></dl></div><h2>Type Definitions</h2><div id="WebElement.Id" class="property"><dl><dt><a href="source/lib/webdriver/webdriver.js.src.html#l1722">WebElement.Id</a><code>{ELEMENT: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}</code><dd><p>Wire protocol definition of a WebElement ID.</p></dl></div></article><nav><h3><a href="index.html">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3>Modules</h3></label><div><ul><li><a href="module_selenium-webdriver.html">selenium-webdriver</a><li><a href="module_selenium-webdriver__base.html">selenium-webdriver/_base</a><li><a href="module_selenium-webdriver_builder.html">selenium-webdriver/builder</a><li><a href="module_selenium-webdriver_chrome.html">selenium-webdriver/chrome</a><li><a href="module_selenium-webdriver_error.html">selenium-webdriver/error</a><li><a href="module_selenium-webdriver_executors.html">selenium-webdriver/executors</a><li><a href="module_selenium-webdriver_firefox.html">selenium-webdriver/firefox</a><li><a href="module_selenium-webdriver_firefox_binary.html">selenium-webdriver/firefox/binary</a><li><a href="module_selenium-webdriver_firefox_extension.html">selenium-webdriver/firefox/extension</a><li><a href="module_selenium-webdriver_firefox_profile.html">selenium-webdriver/firefox/profile</a><li><a href="module_selenium-webdriver_http.html">selenium-webdriver/http</a><li><a href="module_selenium-webdriver_http_util.html">selenium-webdriver/http/util</a><li><a href="module_selenium-webdriver_ie.html">selenium-webdriver/ie</a><li><a href="module_selenium-webdriver_io.html">selenium-webdriver/io</a><li><a href="module_selenium-webdriver_io_exec.html">selenium-webdriver/io/exec</a><li><a href="module_selenium-webdriver_net.html">selenium-webdriver/net</a><li><a href="module_selenium-webdriver_net_portprober.html">selenium-webdriver/net/portprober</a><li><a href="module_selenium-webdriver_opera.html">selenium-webdriver/opera</a><li><a href="module_selenium-webdriver_phantomjs.html">selenium-webdriver/phantomjs</a><li><a href="module_selenium-webdriver_proxy.html">selenium-webdriver/proxy</a><li><a href="module_selenium-webdriver_remote.html">selenium-webdriver/remote</a><li><a href="module_selenium-webdriver_safari.html">selenium-webdriver/safari</a><li><a href="module_selenium-webdriver_testing.html">selenium-webdriver/testing</a><li><a href="module_selenium-webdriver_testing_assert.html">selenium-webdriver/testing/assert</a></ul></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3>Types</h3></label><div><ul><li><a href="namespace_bot.html">bot</a><li><a href="class_bot_Error.html">bot.Error</a><li><a href="enum_bot_Error_State.html">bot.Error.State</a><li><a href="enum_bot_ErrorCode.html">bot.ErrorCode</a><li><a href="namespace_bot_json.html">bot.json</a><li><a href="namespace_bot_response.html">bot.response</a><li><a href="namespace_bot_userAgent.html">bot.userAgent</a><li><a href="namespace_webdriver.html">webdriver</a><li><a href="class_webdriver_ActionSequence.html">webdriver.ActionSequence</a><li><a href="class_webdriver_Alert.html">webdriver.Alert</a><li><a href="class_webdriver_AlertPromise.html">webdriver.AlertPromise</a><li><a href="enum_webdriver_Browser.html">webdriver.Browser</a><li><a href="enum_webdriver_Button.html">webdriver.Button</a><li><a href="namespace_webdriver_By.html">webdriver.By</a><li><a href="class_webdriver_Capabilities.html">webdriver.Capabilities</a><li><a href="enum_webdriver_Capability.html">webdriver.Capability</a><li><a href="class_webdriver_Command.html">webdriver.Command</a><li><a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a><li><a href="enum_webdriver_CommandName.html">webdriver.CommandName</a><li><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a><li><a href="class_webdriver_FileDetector.html">webdriver.FileDetector</a><li><a href="enum_webdriver_Key.html">webdriver.Key</a><li><a href="class_webdriver_Locator.html">webdriver.Locator</a><li><a href="class_webdriver_Serializable.html">webdriver.Serializable</a><li><a href="class_webdriver_Session.html">webdriver.Session</a><li><a href="class_webdriver_TouchSequence.html">webdriver.TouchSequence</a><li><a href="class_webdriver_UnhandledAlertError.html">webdriver.UnhandledAlertError</a><li><a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a><li><a href="class_webdriver_WebDriver_Logs.html">webdriver.WebDriver.Logs</a><li><a href="class_webdriver_WebDriver_Navigation.html">webdriver.WebDriver.Navigation</a><li><a href="class_webdriver_WebDriver_Options.html">webdriver.WebDriver.Options</a><li><a href="class_webdriver_WebDriver_TargetLocator.html">webdriver.WebDriver.TargetLocator</a><li><a href="class_webdriver_WebDriver_Timeouts.html">webdriver.WebDriver.Timeouts</a><li><a href="class_webdriver_WebDriver_Window.html">webdriver.WebDriver.Window</a><li><a href="class_webdriver_WebElement.html">webdriver.WebElement</a><li><a href="class_webdriver_WebElementPromise.html">webdriver.WebElementPromise</a><li><a href="namespace_webdriver_http.html">webdriver.http</a><li><a href="interface_webdriver_http_Client.html">webdriver.http.Client</a><li><a href="class_webdriver_http_Executor.html">webdriver.http.Executor</a><li><a href="class_webdriver_http_Request.html">webdriver.http.Request</a><li><a href="class_webdriver_http_Response.html">webdriver.http.Response</a><li><a href="namespace_webdriver_logging.html">webdriver.logging</a><li><a href="class_webdriver_logging_Entry.html">webdriver.logging.Entry</a><li><a href="enum_webdriver_logging_Level.html">webdriver.logging.Level</a><li><a href="class_webdriver_logging_Preferences.html">webdriver.logging.Preferences</a><li><a href="enum_webdriver_logging_Type.html">webdriver.logging.Type</a><li><a href="namespace_webdriver_promise.html">webdriver.promise</a><li><a href="class_webdriver_promise_Callback_.html">webdriver.promise.Callback_</a><li><a href="class_webdriver_promise_CancellationError.html">webdriver.promise.CancellationError</a><li><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a><li><a href="enum_webdriver_promise_ControlFlow_EventType.html">webdriver.promise.ControlFlow.EventType</a><li><a href="class_webdriver_promise_Deferred.html">webdriver.promise.Deferred</a><li><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a><li><a href="class_webdriver_promise_MicroTask_.html">webdriver.promise.MicroTask_</a><li><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><li><a href="enum_webdriver_promise_Promise_State_.html">webdriver.promise.Promise.State_</a><li><a href="class_webdriver_promise_Task_.html">webdriver.promise.Task_</a><li><a href="interface_webdriver_promise_Thenable.html">webdriver.promise.Thenable</a><li><a href="namespace_webdriver_stacktrace.html">webdriver.stacktrace</a><li><a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a><li><a href="class_webdriver_stacktrace_Snapshot.html">webdriver.stacktrace.Snapshot</a><li><a href="namespace_webdriver_testing.html">webdriver.testing</a><li><a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion</a><li><a href="class_webdriver_testing_Assertion_DelegatingMatcher_.html">webdriver.testing.Assertion.DelegatingMatcher_</a><li><a href="class_webdriver_testing_ContainsMatcher.html">webdriver.testing.ContainsMatcher</a><li><a href="class_webdriver_testing_NegatedAssertion.html">webdriver.testing.NegatedAssertion</a><li><a href="namespace_webdriver_testing_assert.html">webdriver.testing.assert</a><li><a href="namespace_webdriver_testing_asserts.html">webdriver.testing.asserts</a><li><a href="namespace_webdriver_until.html">webdriver.until</a><li><a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a></ul></div></div><h3><a href="Changes.html">Changes</a></h3></nav></main><div class="pre-footer"><div></div></div><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>
\ No newline at end of file