UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

1 lines 16.7 kB
<!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>key.js</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 class="srcfile"><h1>lib/webdriver/key.js</h1><div><table><tr><td><a id="l1"></a><a href="#l1">1</a><td>// Licensed to the Software Freedom Conservancy (SFC) under one<tr><td><a id="l2"></a><a href="#l2">2</a><td>// or more contributor license agreements. See the NOTICE file<tr><td><a id="l3"></a><a href="#l3">3</a><td>// distributed with this work for additional information<tr><td><a id="l4"></a><a href="#l4">4</a><td>// regarding copyright ownership. The SFC licenses this file<tr><td><a id="l5"></a><a href="#l5">5</a><td>// to you under the Apache License, Version 2.0 (the<tr><td><a id="l6"></a><a href="#l6">6</a><td>// &quot;License&quot;); you may not use this file except in compliance<tr><td><a id="l7"></a><a href="#l7">7</a><td>// with the License. You may obtain a copy of the License at<tr><td><a id="l8"></a><a href="#l8">8</a><td>//<tr><td><a id="l9"></a><a href="#l9">9</a><td>// http://www.apache.org/licenses/LICENSE-2.0<tr><td><a id="l10"></a><a href="#l10">10</a><td>//<tr><td><a id="l11"></a><a href="#l11">11</a><td>// Unless required by applicable law or agreed to in writing,<tr><td><a id="l12"></a><a href="#l12">12</a><td>// software distributed under the License is distributed on an<tr><td><a id="l13"></a><a href="#l13">13</a><td>// &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY<tr><td><a id="l14"></a><a href="#l14">14</a><td>// KIND, either express or implied. See the License for the<tr><td><a id="l15"></a><a href="#l15">15</a><td>// specific language governing permissions and limitations<tr><td><a id="l16"></a><a href="#l16">16</a><td>// under the License.<tr><td><a id="l17"></a><a href="#l17">17</a><td><tr><td><a id="l18"></a><a href="#l18">18</a><td>goog.provide(&#39;webdriver.Key&#39;);<tr><td><a id="l19"></a><a href="#l19">19</a><td><tr><td><a id="l20"></a><a href="#l20">20</a><td><tr><td><a id="l21"></a><a href="#l21">21</a><td>/**<tr><td><a id="l22"></a><a href="#l22">22</a><td> * Representations of pressable keys that aren&#39;t text. These are stored in<tr><td><a id="l23"></a><a href="#l23">23</a><td> * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to<tr><td><a id="l24"></a><a href="#l24">24</a><td> * http://www.google.com.au/search?&amp;q=unicode+pua&amp;btnG=Search<tr><td><a id="l25"></a><a href="#l25">25</a><td> *<tr><td><a id="l26"></a><a href="#l26">26</a><td> * @enum {string}<tr><td><a id="l27"></a><a href="#l27">27</a><td> */<tr><td><a id="l28"></a><a href="#l28">28</a><td>webdriver.Key = {<tr><td><a id="l29"></a><a href="#l29">29</a><td> NULL: &#39;\uE000&#39;,<tr><td><a id="l30"></a><a href="#l30">30</a><td> CANCEL: &#39;\uE001&#39;, // ^break<tr><td><a id="l31"></a><a href="#l31">31</a><td> HELP: &#39;\uE002&#39;,<tr><td><a id="l32"></a><a href="#l32">32</a><td> BACK_SPACE: &#39;\uE003&#39;,<tr><td><a id="l33"></a><a href="#l33">33</a><td> TAB: &#39;\uE004&#39;,<tr><td><a id="l34"></a><a href="#l34">34</a><td> CLEAR: &#39;\uE005&#39;,<tr><td><a id="l35"></a><a href="#l35">35</a><td> RETURN: &#39;\uE006&#39;,<tr><td><a id="l36"></a><a href="#l36">36</a><td> ENTER: &#39;\uE007&#39;,<tr><td><a id="l37"></a><a href="#l37">37</a><td> SHIFT: &#39;\uE008&#39;,<tr><td><a id="l38"></a><a href="#l38">38</a><td> CONTROL: &#39;\uE009&#39;,<tr><td><a id="l39"></a><a href="#l39">39</a><td> ALT: &#39;\uE00A&#39;,<tr><td><a id="l40"></a><a href="#l40">40</a><td> PAUSE: &#39;\uE00B&#39;,<tr><td><a id="l41"></a><a href="#l41">41</a><td> ESCAPE: &#39;\uE00C&#39;,<tr><td><a id="l42"></a><a href="#l42">42</a><td> SPACE: &#39;\uE00D&#39;,<tr><td><a id="l43"></a><a href="#l43">43</a><td> PAGE_UP: &#39;\uE00E&#39;,<tr><td><a id="l44"></a><a href="#l44">44</a><td> PAGE_DOWN: &#39;\uE00F&#39;,<tr><td><a id="l45"></a><a href="#l45">45</a><td> END: &#39;\uE010&#39;,<tr><td><a id="l46"></a><a href="#l46">46</a><td> HOME: &#39;\uE011&#39;,<tr><td><a id="l47"></a><a href="#l47">47</a><td> ARROW_LEFT: &#39;\uE012&#39;,<tr><td><a id="l48"></a><a href="#l48">48</a><td> LEFT: &#39;\uE012&#39;,<tr><td><a id="l49"></a><a href="#l49">49</a><td> ARROW_UP: &#39;\uE013&#39;,<tr><td><a id="l50"></a><a href="#l50">50</a><td> UP: &#39;\uE013&#39;,<tr><td><a id="l51"></a><a href="#l51">51</a><td> ARROW_RIGHT: &#39;\uE014&#39;,<tr><td><a id="l52"></a><a href="#l52">52</a><td> RIGHT: &#39;\uE014&#39;,<tr><td><a id="l53"></a><a href="#l53">53</a><td> ARROW_DOWN: &#39;\uE015&#39;,<tr><td><a id="l54"></a><a href="#l54">54</a><td> DOWN: &#39;\uE015&#39;,<tr><td><a id="l55"></a><a href="#l55">55</a><td> INSERT: &#39;\uE016&#39;,<tr><td><a id="l56"></a><a href="#l56">56</a><td> DELETE: &#39;\uE017&#39;,<tr><td><a id="l57"></a><a href="#l57">57</a><td> SEMICOLON: &#39;\uE018&#39;,<tr><td><a id="l58"></a><a href="#l58">58</a><td> EQUALS: &#39;\uE019&#39;,<tr><td><a id="l59"></a><a href="#l59">59</a><td><tr><td><a id="l60"></a><a href="#l60">60</a><td> NUMPAD0: &#39;\uE01A&#39;, // number pad keys<tr><td><a id="l61"></a><a href="#l61">61</a><td> NUMPAD1: &#39;\uE01B&#39;,<tr><td><a id="l62"></a><a href="#l62">62</a><td> NUMPAD2: &#39;\uE01C&#39;,<tr><td><a id="l63"></a><a href="#l63">63</a><td> NUMPAD3: &#39;\uE01D&#39;,<tr><td><a id="l64"></a><a href="#l64">64</a><td> NUMPAD4: &#39;\uE01E&#39;,<tr><td><a id="l65"></a><a href="#l65">65</a><td> NUMPAD5: &#39;\uE01F&#39;,<tr><td><a id="l66"></a><a href="#l66">66</a><td> NUMPAD6: &#39;\uE020&#39;,<tr><td><a id="l67"></a><a href="#l67">67</a><td> NUMPAD7: &#39;\uE021&#39;,<tr><td><a id="l68"></a><a href="#l68">68</a><td> NUMPAD8: &#39;\uE022&#39;,<tr><td><a id="l69"></a><a href="#l69">69</a><td> NUMPAD9: &#39;\uE023&#39;,<tr><td><a id="l70"></a><a href="#l70">70</a><td> MULTIPLY: &#39;\uE024&#39;,<tr><td><a id="l71"></a><a href="#l71">71</a><td> ADD: &#39;\uE025&#39;,<tr><td><a id="l72"></a><a href="#l72">72</a><td> SEPARATOR: &#39;\uE026&#39;,<tr><td><a id="l73"></a><a href="#l73">73</a><td> SUBTRACT: &#39;\uE027&#39;,<tr><td><a id="l74"></a><a href="#l74">74</a><td> DECIMAL: &#39;\uE028&#39;,<tr><td><a id="l75"></a><a href="#l75">75</a><td> DIVIDE: &#39;\uE029&#39;,<tr><td><a id="l76"></a><a href="#l76">76</a><td><tr><td><a id="l77"></a><a href="#l77">77</a><td> F1: &#39;\uE031&#39;, // function keys<tr><td><a id="l78"></a><a href="#l78">78</a><td> F2: &#39;\uE032&#39;,<tr><td><a id="l79"></a><a href="#l79">79</a><td> F3: &#39;\uE033&#39;,<tr><td><a id="l80"></a><a href="#l80">80</a><td> F4: &#39;\uE034&#39;,<tr><td><a id="l81"></a><a href="#l81">81</a><td> F5: &#39;\uE035&#39;,<tr><td><a id="l82"></a><a href="#l82">82</a><td> F6: &#39;\uE036&#39;,<tr><td><a id="l83"></a><a href="#l83">83</a><td> F7: &#39;\uE037&#39;,<tr><td><a id="l84"></a><a href="#l84">84</a><td> F8: &#39;\uE038&#39;,<tr><td><a id="l85"></a><a href="#l85">85</a><td> F9: &#39;\uE039&#39;,<tr><td><a id="l86"></a><a href="#l86">86</a><td> F10: &#39;\uE03A&#39;,<tr><td><a id="l87"></a><a href="#l87">87</a><td> F11: &#39;\uE03B&#39;,<tr><td><a id="l88"></a><a href="#l88">88</a><td> F12: &#39;\uE03C&#39;,<tr><td><a id="l89"></a><a href="#l89">89</a><td><tr><td><a id="l90"></a><a href="#l90">90</a><td> COMMAND: &#39;\uE03D&#39;, // Apple command key<tr><td><a id="l91"></a><a href="#l91">91</a><td> META: &#39;\uE03D&#39; // alias for Windows key<tr><td><a id="l92"></a><a href="#l92">92</a><td>};</table></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="../../../class_webdriver_logging_Level.html">webdriver.logging.Level</a><li><a href="../../../class_webdriver_logging_LogRecord.html">webdriver.logging.LogRecord</a><li><a href="../../../class_webdriver_logging_Logger.html">webdriver.logging.Logger</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_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_Promise.html">webdriver.promise.Promise</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>