selenium-webdriver 2.43.5 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGES.md +20 -0
  2. package/README.md +8 -13
  3. package/builder.js +4 -3
  4. package/docs/class_webdriver_Alert.html +6 -6
  5. package/docs/class_webdriver_AlertPromise.html +6 -6
  6. package/docs/class_webdriver_UnhandledAlertError.html +4 -4
  7. package/docs/class_webdriver_WebDriver.html +39 -37
  8. package/docs/class_webdriver_WebDriver_Logs.html +3 -3
  9. package/docs/class_webdriver_WebDriver_Navigation.html +5 -5
  10. package/docs/class_webdriver_WebDriver_Options.html +9 -9
  11. package/docs/class_webdriver_WebDriver_TargetLocator.html +6 -6
  12. package/docs/class_webdriver_WebDriver_Timeouts.html +4 -4
  13. package/docs/class_webdriver_WebDriver_Window.html +6 -6
  14. package/docs/class_webdriver_WebElement.html +23 -23
  15. package/docs/class_webdriver_WebElementPromise.html +22 -22
  16. package/docs/class_webdriver_promise_CancellationError.html +3 -0
  17. package/docs/class_webdriver_promise_ControlFlow.html +32 -32
  18. package/docs/class_webdriver_promise_Deferred.html +7 -8
  19. package/docs/class_webdriver_promise_Frame_.html +14 -30
  20. package/docs/class_webdriver_promise_Promise.html +2 -2
  21. package/docs/class_webdriver_promise_Task_.html +12 -12
  22. package/docs/class_webdriver_until_Condition.html +3 -0
  23. package/docs/enum_webdriver_Key.html +1 -1
  24. package/docs/enum_webdriver_promise_ControlFlow_EventType.html +1 -1
  25. package/docs/enum_webdriver_promise_Deferred_State_.html +1 -1
  26. package/docs/index.html +8 -13
  27. package/docs/interface_webdriver_promise_Thenable.html +8 -10
  28. package/docs/license.html +1 -1
  29. package/docs/module_selenium-webdriver.html +2 -2
  30. package/docs/module_selenium-webdriver__base.html +1 -1
  31. package/docs/module_selenium-webdriver__base_class_Context.html +1 -1
  32. package/docs/module_selenium-webdriver_builder.html +1 -1
  33. package/docs/module_selenium-webdriver_builder_class_Builder.html +1 -1
  34. package/docs/module_selenium-webdriver_chrome.html +1 -1
  35. package/docs/module_selenium-webdriver_chrome_class_Driver.html +2 -2
  36. package/docs/module_selenium-webdriver_chrome_class_Options.html +2 -2
  37. package/docs/module_selenium-webdriver_chrome_class_ServiceBuilder.html +1 -1
  38. package/docs/module_selenium-webdriver_error.html +1 -1
  39. package/docs/module_selenium-webdriver_executors.html +1 -1
  40. package/docs/module_selenium-webdriver_firefox.html +1 -1
  41. package/docs/module_selenium-webdriver_firefox_binary.html +1 -1
  42. package/docs/module_selenium-webdriver_firefox_binary_class_Binary.html +1 -1
  43. package/docs/module_selenium-webdriver_firefox_class_Driver.html +2 -2
  44. package/docs/module_selenium-webdriver_firefox_class_Options.html +1 -1
  45. package/docs/module_selenium-webdriver_firefox_extension.html +1 -1
  46. package/docs/module_selenium-webdriver_firefox_profile.html +1 -1
  47. package/docs/module_selenium-webdriver_firefox_profile_class_Profile.html +1 -1
  48. package/docs/module_selenium-webdriver_http.html +1 -1
  49. package/docs/module_selenium-webdriver_http_class_HttpClient.html +1 -1
  50. package/docs/module_selenium-webdriver_http_util.html +1 -1
  51. package/docs/module_selenium-webdriver_io.html +1 -1
  52. package/docs/module_selenium-webdriver_io_exec.html +1 -1
  53. package/docs/module_selenium-webdriver_net.html +1 -1
  54. package/docs/module_selenium-webdriver_net_portprober.html +1 -1
  55. package/docs/module_selenium-webdriver_phantomjs.html +1 -1
  56. package/docs/module_selenium-webdriver_phantomjs_class_Driver.html +2 -2
  57. package/docs/module_selenium-webdriver_proxy.html +1 -1
  58. package/docs/module_selenium-webdriver_remote.html +1 -1
  59. package/docs/module_selenium-webdriver_remote_class_DriverService.html +2 -2
  60. package/docs/module_selenium-webdriver_remote_class_SeleniumServer.html +2 -2
  61. package/docs/module_selenium-webdriver_testing.html +16 -29
  62. package/docs/module_selenium-webdriver_testing_assert.html +1 -1
  63. package/docs/namespace_webdriver_promise.html +18 -20
  64. package/docs/namespace_webdriver_stacktrace.html +15 -15
  65. package/docs/namespace_webdriver_until.html +32 -0
  66. package/docs/source/_base.js.src.html +1 -1
  67. package/docs/source/builder.js.src.html +1 -1
  68. package/docs/source/chrome.js.src.html +1 -1
  69. package/docs/source/error.js.src.html +1 -1
  70. package/docs/source/executors.js.src.html +1 -1
  71. package/docs/source/firefox/binary.js.src.html +1 -1
  72. package/docs/source/firefox/extension.js.src.html +1 -1
  73. package/docs/source/firefox/index.js.src.html +1 -1
  74. package/docs/source/firefox/profile.js.src.html +1 -1
  75. package/docs/source/http/index.js.src.html +1 -1
  76. package/docs/source/http/util.js.src.html +1 -1
  77. package/docs/source/index.js.src.html +1 -1
  78. package/docs/source/io/exec.js.src.html +1 -1
  79. package/docs/source/io/index.js.src.html +1 -1
  80. package/docs/source/lib/atoms/error.js.src.html +1 -1
  81. package/docs/source/lib/atoms/json.js.src.html +1 -1
  82. package/docs/source/lib/atoms/response.js.src.html +1 -1
  83. package/docs/source/lib/atoms/userAgent.js.src.html +1 -1
  84. package/docs/source/lib/goog/array/array.js.src.html +1 -1
  85. package/docs/source/lib/goog/asserts/asserts.js.src.html +1 -1
  86. package/docs/source/lib/goog/async/nexttick.js.src.html +1 -1
  87. package/docs/source/lib/goog/async/run.js.src.html +1 -1
  88. package/docs/source/lib/goog/base.js.src.html +1 -1
  89. package/docs/source/lib/goog/debug/debug.js.src.html +1 -1
  90. package/docs/source/lib/goog/debug/entrypointregistry.js.src.html +1 -1
  91. package/docs/source/lib/goog/debug/error.js.src.html +1 -1
  92. package/docs/source/lib/goog/debug/logbuffer.js.src.html +1 -1
  93. package/docs/source/lib/goog/debug/logger.js.src.html +1 -1
  94. package/docs/source/lib/goog/debug/logrecord.js.src.html +1 -1
  95. package/docs/source/lib/goog/deps.js.src.html +1 -1
  96. package/docs/source/lib/goog/disposable/disposable.js.src.html +1 -1
  97. package/docs/source/lib/goog/disposable/idisposable.js.src.html +1 -1
  98. package/docs/source/lib/goog/dom/browserfeature.js.src.html +1 -1
  99. package/docs/source/lib/goog/dom/dom.js.src.html +1 -1
  100. package/docs/source/lib/goog/dom/nodetype.js.src.html +1 -1
  101. package/docs/source/lib/goog/dom/tagname.js.src.html +1 -1
  102. package/docs/source/lib/goog/dom/vendor.js.src.html +1 -1
  103. package/docs/source/lib/goog/events/browserevent.js.src.html +1 -1
  104. package/docs/source/lib/goog/events/browserfeature.js.src.html +1 -1
  105. package/docs/source/lib/goog/events/event.js.src.html +1 -1
  106. package/docs/source/lib/goog/events/eventid.js.src.html +1 -1
  107. package/docs/source/lib/goog/events/events.js.src.html +1 -1
  108. package/docs/source/lib/goog/events/eventtarget.js.src.html +1 -1
  109. package/docs/source/lib/goog/events/eventtype.js.src.html +1 -1
  110. package/docs/source/lib/goog/events/keycodes.js.src.html +1 -1
  111. package/docs/source/lib/goog/events/listenable.js.src.html +1 -1
  112. package/docs/source/lib/goog/events/listener.js.src.html +1 -1
  113. package/docs/source/lib/goog/events/listenermap.js.src.html +1 -1
  114. package/docs/source/lib/goog/functions/functions.js.src.html +1 -1
  115. package/docs/source/lib/goog/iter/iter.js.src.html +1 -1
  116. package/docs/source/lib/goog/json/json.js.src.html +1 -1
  117. package/docs/source/lib/goog/labs/testing/assertthat.js.src.html +1 -1
  118. package/docs/source/lib/goog/labs/testing/logicmatcher.js.src.html +1 -1
  119. package/docs/source/lib/goog/labs/testing/matcher.js.src.html +1 -1
  120. package/docs/source/lib/goog/labs/testing/numbermatcher.js.src.html +1 -1
  121. package/docs/source/lib/goog/labs/testing/objectmatcher.js.src.html +1 -1
  122. package/docs/source/lib/goog/labs/testing/stringmatcher.js.src.html +1 -1
  123. package/docs/source/lib/goog/labs/useragent/browser.js.src.html +1 -1
  124. package/docs/source/lib/goog/labs/useragent/engine.js.src.html +1 -1
  125. package/docs/source/lib/goog/labs/useragent/util.js.src.html +1 -1
  126. package/docs/source/lib/goog/math/box.js.src.html +1 -1
  127. package/docs/source/lib/goog/math/coordinate.js.src.html +1 -1
  128. package/docs/source/lib/goog/math/math.js.src.html +1 -1
  129. package/docs/source/lib/goog/math/rect.js.src.html +1 -1
  130. package/docs/source/lib/goog/math/size.js.src.html +1 -1
  131. package/docs/source/lib/goog/net/wrapperxmlhttpfactory.js.src.html +1 -1
  132. package/docs/source/lib/goog/net/xhrlike.js.src.html +1 -1
  133. package/docs/source/lib/goog/net/xmlhttp.js.src.html +1 -1
  134. package/docs/source/lib/goog/net/xmlhttpfactory.js.src.html +1 -1
  135. package/docs/source/lib/goog/object/object.js.src.html +1 -1
  136. package/docs/source/lib/goog/reflect/reflect.js.src.html +1 -1
  137. package/docs/source/lib/goog/string/string.js.src.html +1 -1
  138. package/docs/source/lib/goog/structs/collection.js.src.html +1 -1
  139. package/docs/source/lib/goog/structs/map.js.src.html +1 -1
  140. package/docs/source/lib/goog/structs/set.js.src.html +1 -1
  141. package/docs/source/lib/goog/structs/structs.js.src.html +1 -1
  142. package/docs/source/lib/goog/style/style.js.src.html +1 -1
  143. package/docs/source/lib/goog/testing/asserts.js.src.html +1 -1
  144. package/docs/source/lib/goog/testing/asynctestcase.js.src.html +1 -1
  145. package/docs/source/lib/goog/testing/events/events.js.src.html +1 -1
  146. package/docs/source/lib/goog/testing/functionmock.js.src.html +1 -1
  147. package/docs/source/lib/goog/testing/jsunit.js.src.html +1 -1
  148. package/docs/source/lib/goog/testing/loosemock.js.src.html +1 -1
  149. package/docs/source/lib/goog/testing/mock.js.src.html +1 -1
  150. package/docs/source/lib/goog/testing/mockclock.js.src.html +1 -1
  151. package/docs/source/lib/goog/testing/mockcontrol.js.src.html +1 -1
  152. package/docs/source/lib/goog/testing/mockinterface.js.src.html +1 -1
  153. package/docs/source/lib/goog/testing/mockmatchers.js.src.html +1 -1
  154. package/docs/source/lib/goog/testing/objectpropertystring.js.src.html +1 -1
  155. package/docs/source/lib/goog/testing/propertyreplacer.js.src.html +1 -1
  156. package/docs/source/lib/goog/testing/recordfunction.js.src.html +1 -1
  157. package/docs/source/lib/goog/testing/stacktrace.js.src.html +1 -1
  158. package/docs/source/lib/goog/testing/strictmock.js.src.html +1 -1
  159. package/docs/source/lib/goog/testing/testcase.js.src.html +1 -1
  160. package/docs/source/lib/goog/testing/testrunner.js.src.html +1 -1
  161. package/docs/source/lib/goog/testing/watchers.js.src.html +1 -1
  162. package/docs/source/lib/goog/uri/uri.js.src.html +1 -1
  163. package/docs/source/lib/goog/uri/utils.js.src.html +1 -1
  164. package/docs/source/lib/goog/useragent/product.js.src.html +1 -1
  165. package/docs/source/lib/goog/useragent/product_isversion.js.src.html +1 -1
  166. package/docs/source/lib/goog/useragent/useragent.js.src.html +1 -1
  167. package/docs/source/lib/webdriver/abstractbuilder.js.src.html +1 -1
  168. package/docs/source/lib/webdriver/actionsequence.js.src.html +1 -1
  169. package/docs/source/lib/webdriver/builder.js.src.html +1 -1
  170. package/docs/source/lib/webdriver/button.js.src.html +1 -1
  171. package/docs/source/lib/webdriver/capabilities.js.src.html +1 -1
  172. package/docs/source/lib/webdriver/command.js.src.html +1 -1
  173. package/docs/source/lib/webdriver/events.js.src.html +1 -1
  174. package/docs/source/lib/webdriver/firefoxdomexecutor.js.src.html +1 -1
  175. package/docs/source/lib/webdriver/http/corsclient.js.src.html +1 -1
  176. package/docs/source/lib/webdriver/http/http.js.src.html +1 -1
  177. package/docs/source/lib/webdriver/http/xhrclient.js.src.html +1 -1
  178. package/docs/source/lib/webdriver/key.js.src.html +1 -1
  179. package/docs/source/lib/webdriver/locators.js.src.html +1 -1
  180. package/docs/source/lib/webdriver/logging.js.src.html +1 -1
  181. package/docs/source/lib/webdriver/process.js.src.html +1 -1
  182. package/docs/source/lib/webdriver/promise.js.src.html +1 -1
  183. package/docs/source/lib/webdriver/session.js.src.html +1 -1
  184. package/docs/source/lib/webdriver/stacktrace.js.src.html +1 -1
  185. package/docs/source/lib/webdriver/testing/asserts.js.src.html +1 -1
  186. package/docs/source/lib/webdriver/testing/testcase.js.src.html +1 -1
  187. package/docs/source/lib/webdriver/until.js.src.html +1 -0
  188. package/docs/source/lib/webdriver/webdriver.js.src.html +1 -1
  189. package/docs/source/net/index.js.src.html +1 -1
  190. package/docs/source/net/portprober.js.src.html +1 -1
  191. package/docs/source/phantomjs.js.src.html +1 -1
  192. package/docs/source/proxy.js.src.html +1 -1
  193. package/docs/source/remote/index.js.src.html +1 -1
  194. package/docs/source/testing/assert.js.src.html +1 -1
  195. package/docs/source/testing/index.js.src.html +1 -1
  196. package/docs/types.js +1 -1
  197. package/example/google_search.js +9 -17
  198. package/example/google_search_generator.js +6 -7
  199. package/example/google_search_test.js +10 -18
  200. package/example/parallel_flows.js +4 -7
  201. package/index.js +6 -0
  202. package/lib/firefox/webdriver.xpi +0 -0
  203. package/lib/goog/deps.js +7 -5
  204. package/lib/test/index.js +0 -8
  205. package/lib/webdriver/promise.js +263 -251
  206. package/lib/webdriver/stacktrace.js +15 -1
  207. package/lib/webdriver/test/promise_flow_test.js +82 -76
  208. package/lib/webdriver/test/promise_test.js +22 -62
  209. package/lib/webdriver/test/stacktrace_test.js +18 -0
  210. package/lib/webdriver/test/until_test.js +388 -0
  211. package/lib/webdriver/test/webdriver_test.js +41 -0
  212. package/lib/webdriver/until.js +408 -0
  213. package/lib/webdriver/webdriver.js +91 -29
  214. package/package.json +2 -2
  215. package/test/element_finding_test.js +6 -6
  216. package/test/http/util_test.js +4 -5
  217. package/test/page_loading_test.js +7 -7
  218. package/test/stale_element_test.js +2 -10
  219. package/testing/index.js +9 -22
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebElementPromise</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.WebElementPromise</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2063">code &raquo;</a><pre><code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a>
1
+ <!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebElementPromise</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.WebElementPromise</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2125">code &raquo;</a><pre><code><a href="class_webdriver_WebElement.html">webdriver.WebElement</a>
2
2
  &#x2514; webdriver.WebElementPromise</code></pre><dl><dt>All implemented interfaces:<dd><code><a href="">webdriver.promise.Thenable.&lt;webdriver.WebElement&gt;</a></code></dl></header><section><p>WebElementPromise is a promise that will be fulfilled with a WebElement.
3
3
  This serves as a forward proxy on WebElement, allowing calls to be
4
4
  scheduled without directly on this instance before the underlying
@@ -11,11 +11,11 @@
11
11
  });
12
12
  </code></pre><h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebElementPromise <span class="args">( driver, el )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>driver: <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code><dd>The parent WebDriver instance for this
13
13
  element.<dt>el: <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd>A promise
14
- that will resolve to the promised element.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">webdriver.WebElementPromise</code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2067">code &raquo;</a><span class="member"><a name="cancel">cancel</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2070">code &raquo;</a><span class="member"><a name="isPending">isPending</a> <span class="args">( )</span> &rArr; <code class="type">boolean</code></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2073">code &raquo;</a><span class="member"><a name="then">then</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2076">code &raquo;</a><span class="member"><a name="thenCatch">thenCatch</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2079">code &raquo;</a><span class="member"><a name="thenFinally">thenFinally</a> <span class="args">( )</span></span></div></summary></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1992">code &raquo;</a><span class="member"><a name="clear">clear</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to clear the <code >value</code> of this element. This command
14
+ that will resolve to the promised element.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">webdriver.WebElementPromise</code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2129">code &raquo;</a><span class="member"><a name="cancel">cancel</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2132">code &raquo;</a><span class="member"><a name="isPending">isPending</a> <span class="args">( )</span> &rArr; <code class="type">boolean</code></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2135">code &raquo;</a><span class="member"><a name="then">then</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2138">code &raquo;</a><span class="member"><a name="thenCatch">thenCatch</a> <span class="args">( )</span></span></div></summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2141">code &raquo;</a><span class="member"><a name="thenFinally">thenFinally</a> <span class="args">( )</span></span></div></summary></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2054">code &raquo;</a><span class="member"><a name="clear">clear</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to clear the <code >value</code> of this element. This command
15
15
  has no effect if the underlying DOM element is neither a text INPUT element
16
16
  nor a TEXTAREA element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
17
- when the element has been cleared.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1769">code &raquo;</a><span class="member"><a name="click">click</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to click on this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
18
- when the click command has completed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1709">code &raquo;</a><span class="member"><a name="findElement">findElement</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></span></div><p>Schedule a command to find a descendant of this element. If the element
17
+ when the element has been cleared.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1831">code &raquo;</a><span class="member"><a name="click">click</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to click on this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
18
+ when the click command has completed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1771">code &raquo;</a><span class="member"><a name="findElement">findElement</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></span></div><p>Schedule a command to find a descendant of this element. If the element
19
19
  cannot be found, a <code >bot.ErrorCode.NO_SUCH_ELEMENT</code> result will
20
20
  be returned by the driver. Unlike other commands, this error cannot be
21
21
  suppressed. In other words, scheduling a command to find an element doubles
@@ -49,10 +49,10 @@
49
49
  </pre></code></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>locator: <code class="type">!(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|<a href="namespace_webdriver_By.html#webdriver.By.Hash">webdriver.By.Hash</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The
50
50
  locator strategy to use when searching for the element.</dl><tr><th>Returns<tr><td><dl>A WebElement that can be used to issue
51
51
  commands against the located element. If the element is not found, the
52
- element will be invalidated and all scheduled commands aborted.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1750">code &raquo;</a><span class="member"><a name="findElements">findElements</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to find all of the descendants of this element that
52
+ element will be invalidated and all scheduled commands aborted.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1812">code &raquo;</a><span class="member"><a name="findElements">findElements</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to find all of the descendants of this element that
53
53
  match the given search criteria.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>locator: <code class="type">!(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|<a href="namespace_webdriver_By.html#webdriver.By.Hash">webdriver.By.Hash</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The
54
54
  locator strategy to use when searching for the elements.</dl><tr><th>Returns<tr><td><dl>A
55
- promise that will resolve to an array of WebElements.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1898">code &raquo;</a><span class="member"><a name="getAttribute">getAttribute</a> <span class="args">( attributeName )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to query for the value of the given attribute of the
55
+ promise that will resolve to an array of WebElements.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1960">code &raquo;</a><span class="member"><a name="getAttribute">getAttribute</a> <span class="args">( attributeName )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to query for the value of the given attribute of the
56
56
  element. Will return the current value, even if it has been modified after
57
57
  the page has been loaded. More exactly, this method will return the value of
58
58
  the given attribute, unless that attribute is not present, in which case the
@@ -76,7 +76,7 @@
76
76
  <li>"readonly"
77
77
  </ul></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>attributeName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The name of the attribute to query.</dl><tr><th>Returns<tr><td><dl>A promise that will be
78
78
  resolved with the attribute's value. The returned value will always be
79
- either a string or null.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1860">code &raquo;</a><span class="member"><a name="getCssValue">getCssValue</a> <span class="args">( cssStyleProperty )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to query for the computed style of the element
79
+ either a string or null.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1922">code &raquo;</a><span class="member"><a name="getCssValue">getCssValue</a> <span class="args">( cssStyleProperty )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to query for the computed style of the element
80
80
  represented by this instance. If the element inherits the named style from
81
81
  its parent, the parent will be queried for its value. Where possible, color
82
82
  values will be converted to their hex representation (e.g. #00ff00 instead of
@@ -85,29 +85,29 @@
85
85
  <em>Warning:</em> the value returned will be as the browser interprets it, so
86
86
  it may be tricky to form a proper assertion.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>cssStyleProperty: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The name of the CSS style property to look
87
87
  up.</dl><tr><th>Returns<tr><td><dl>A promise that will be
88
- resolved with the requested CSS value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1635">code &raquo;</a><span class="member"><a name="getDriver">getDriver</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The parent driver for this instance.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1646">code &raquo;</a><span class="member"><a name="getId">getId</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="class_webdriver_WebElement.html#webdriver.WebElement.Id">webdriver.WebElement.Id</a>&gt;</code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise
88
+ resolved with the requested CSS value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1697">code &raquo;</a><span class="member"><a name="getDriver">getDriver</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The parent driver for this instance.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1708">code &raquo;</a><span class="member"><a name="getId">getId</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="class_webdriver_WebElement.html#webdriver.WebElement.Id">webdriver.WebElement.Id</a>&gt;</code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise
89
89
  that resolves to this element's JSON representation as defined by the
90
- WebDriver wire protocol.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2035">code &raquo;</a><span class="member"><a name="getInnerHtml">getInnerHtml</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to retrieve the inner HTML of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
91
- resolved with the element's inner HTML.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1939">code &raquo;</a><span class="member"><a name="getLocation">getLocation</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to compute the location of this element in page space.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that
90
+ WebDriver wire protocol.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2097">code &raquo;</a><span class="member"><a name="getInnerHtml">getInnerHtml</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to retrieve the inner HTML of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
91
+ resolved with the element's inner HTML.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2001">code &raquo;</a><span class="member"><a name="getLocation">getLocation</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to compute the location of this element in page space.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that
92
92
  will be resolved to the element's location as a
93
- <code >{x:number, y:number}</code> object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2016">code &raquo;</a><span class="member"><a name="getOuterHtml">getOuterHtml</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to retrieve the outer HTML of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
94
- resolved with the element's outer HTML.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1926">code &raquo;</a><span class="member"><a name="getSize">getSize</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to compute the size of this element's bounding box, in
93
+ <code >{x:number, y:number}</code> object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2078">code &raquo;</a><span class="member"><a name="getOuterHtml">getOuterHtml</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to retrieve the outer HTML of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
94
+ resolved with the element's outer HTML.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1988">code &raquo;</a><span class="member"><a name="getSize">getSize</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to compute the size of this element's bounding box, in
95
95
  pixels.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A
96
96
  promise that will be resolved with the element's size as a
97
- <code >{width:number, height:number}</code> object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1838">code &raquo;</a><span class="member"><a name="getTagName">getTagName</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to query for the tag/node name of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
98
- resolved with the element's tag name.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1912">code &raquo;</a><span class="member"><a name="getText">getText</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Get the visible (i.e. not hidden by CSS) innerText of this element, including
97
+ <code >{width:number, height:number}</code> object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1900">code &raquo;</a><span class="member"><a name="getTagName">getTagName</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Schedules a command to query for the tag/node name of this element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
98
+ resolved with the element's tag name.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1974">code &raquo;</a><span class="member"><a name="getText">getText</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Get the visible (i.e. not hidden by CSS) innerText of this element, including
99
99
  sub-elements, without any leading or trailing whitespace.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
100
- resolved with the element's visible text.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2004">code &raquo;</a><span class="member"><a name="isDisplayed">isDisplayed</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to test whether this element is currently displayed.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
101
- resolved with whether this element is currently visible on the page.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1734">code &raquo;</a><span class="member"><a name="isElementPresent">isElementPresent</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to test if there is at least one descendant of this
100
+ resolved with the element's visible text.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2066">code &raquo;</a><span class="member"><a name="isDisplayed">isDisplayed</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to test whether this element is currently displayed.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
101
+ resolved with whether this element is currently visible on the page.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1796">code &raquo;</a><span class="member"><a name="isElementPresent">isElementPresent</a> <span class="args">( locator )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to test if there is at least one descendant of this
102
102
  element that matches the given search criteria.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>locator: <code class="type">!(<a href="class_webdriver_Locator.html">webdriver.Locator</a>|<a href="namespace_webdriver_By.html#webdriver.By.Hash">webdriver.By.Hash</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The
103
103
  locator strategy to use when searching for the element.</dl><tr><th>Returns<tr><td><dl>A promise that will be
104
- resolved with whether an element could be located on the page.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1952">code &raquo;</a><span class="member"><a name="isEnabled">isEnabled</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to query whether the DOM element represented by this
104
+ resolved with whether an element could be located on the page.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2014">code &raquo;</a><span class="member"><a name="isEnabled">isEnabled</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to query whether the DOM element represented by this
105
105
  instance is enabled, as dicted by the <code >disabled</code> attribute.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
106
- resolved with whether this element is currently enabled.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1964">code &raquo;</a><span class="member"><a name="isSelected">isSelected</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to query whether this element is selected.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
107
- resolved with whether this element is currently selected.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1663">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="schedule_">schedule_</a> <span class="args">( command, description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;</code></span></div><p>Schedules a command that targets this element with the parent WebDriver
106
+ resolved with whether this element is currently enabled.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2026">code &raquo;</a><span class="member"><a name="isSelected">isSelected</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>&gt;</code></span></div><p>Schedules a command to query whether this element is selected.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
107
+ resolved with whether this element is currently selected.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1725">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="schedule_">schedule_</a> <span class="args">( command, description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;</code></span></div><p>Schedules a command that targets this element with the parent WebDriver
108
108
  instance. Will ensure this element's ID is included in the command parameters
109
109
  under the "id" key.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>command: <code class="type">!<a href="class_webdriver_Command.html">webdriver.Command</a></code><dd>The command to schedule.<dt>description: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>A description of the command for debugging.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
110
- with the command result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1816">code &raquo;</a><span class="member"><a name="sendKeys">sendKeys</a> <span class="args">( var_args )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to type a sequence on the DOM element represented by this
110
+ with the command result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1878">code &raquo;</a><span class="member"><a name="sendKeys">sendKeys</a> <span class="args">( var_args )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to type a sequence on the DOM element represented by this
111
111
  instance.
112
112
  <p/>
113
113
  Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is
@@ -141,7 +141,7 @@
141
141
  keyboard layout.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>var_args: <code class="type">...<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The sequence of keys to
142
142
  type. All arguments will be joined into a single sequence (var_args is
143
143
  permitted for convenience).</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
144
- when all keys have been typed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1978">code &raquo;</a><span class="member"><a name="submit">submit</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to submit the form containing this element (or this
144
+ when all keys have been typed.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2040">code &raquo;</a><span class="member"><a name="submit">submit</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;void&gt;</code></span></div><p>Schedules a command to submit the form containing this element (or this
145
145
  element if it is a FORM element). This command is a no-op if the element is
146
146
  not contained in a form.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
147
- when the form has been submitted.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1578">code &raquo;</a><span class="member"><a name="driver_">driver_</a> : <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1581">code &raquo;</a><span class="member"><a name="id_">id_</a> : <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="class_webdriver_WebElement.html#webdriver.WebElement.Id">webdriver.WebElement.Id</a>&gt;</code></span></div></summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2063">code &raquo;</a><span class="member"><a name="webdriver.WebElementPromise.superClass_">webdriver.WebElementPromise.superClass_</a> : <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>
147
+ when the form has been submitted.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1640">code &raquo;</a><span class="member"><a name="driver_">driver_</a> : <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1643">code &raquo;</a><span class="member"><a name="id_">id_</a> : <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;<a href="class_webdriver_WebElement.html#webdriver.WebElement.Id">webdriver.WebElement.Id</a>&gt;</code></span></div></summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l2125">code &raquo;</a><span class="member"><a name="webdriver.WebElementPromise.superClass_">webdriver.WebElementPromise.superClass_</a> : <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>
@@ -0,0 +1,3 @@
1
+ <!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.promise.CancellationError</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.promise.CancellationError</h1><a class="source" href="source/lib/webdriver/promise.js.src.html#l72">code &raquo;</a><pre><code><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a>
2
+ &#x2514; <a href="class_goog_debug_Error.html">goog.debug.Error</a>
3
+ &#x2514; webdriver.promise.CancellationError</code></pre></header><section><p>Error used when the computation of a promise is cancelled.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.promise.CancellationError <span class="args">( opt_msg )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_msg: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The cancellation message.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l72">code &raquo;</a><span class="member"><a name="webdriver.promise.CancellationError.superClass_">webdriver.promise.CancellationError.superClass_</a> : <code class="type"><a href="class_goog_debug_Error.html">goog.debug.Error.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.promise.ControlFlow</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.promise.ControlFlow</h1><a class="source" href="source/lib/webdriver/promise.js.src.html#l1030">code &raquo;</a><pre><code><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a>
1
+ <!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.promise.ControlFlow</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.promise.ControlFlow</h1><a class="source" href="source/lib/webdriver/promise.js.src.html#l1048">code &raquo;</a><pre><code><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a>
2
2
  &#x2514; webdriver.promise.ControlFlow</code></pre></header><section><p>Handles the execution of scheduled tasks, each of which may be an
3
3
  asynchronous operation. The control flow will ensure tasks are executed in
4
4
  the ordered scheduled, starting each task only once those before it have
@@ -23,46 +23,46 @@
23
23
  <code class="type"><a href="enum_webdriver_promise_ControlFlow_EventType.html#webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION">webdriver.promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION</a></code> event. If
24
24
  there are no listeners registered with the flow, the error will be
25
25
  rethrown to the global error handler.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.promise.ControlFlow <span class="args">( opt_timer )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_timer: <code class="type"><a href="class_webdriver_promise_ControlFlow.html#webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a>=</code><dd>The timer object
26
- to use. Should only be set for testing.</dl></table></div></div></div></section><section><h2>Enumerations</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="enum_webdriver_promise_ControlFlow_EventType.html">webdriver.promise.ControlFlow.EventType</a><dd>Events that may be emitted by an <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code>.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1057">code &raquo;</a><a class="member" name="webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a> : <code class="type">{clearInterval: function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>), clearTimeout: function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>), setInterval: function(!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, setTimeout: function(!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}</code></div><div>No description.</div></summary></details></div></div></section><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">webdriver.promise.ControlFlow</code></h3><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1577">code &raquo;</a><span class="member"><a name="abortFrame_">abortFrame_</a> <span class="args">( error )</span></span></div><p>Aborts the current frame. The frame, and all of the tasks scheduled within it
26
+ to use. Should only be set for testing.</dl></table></div></div></div></section><section><h2>Enumerations</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="enum_webdriver_promise_ControlFlow_EventType.html">webdriver.promise.ControlFlow.EventType</a><dd>Events that may be emitted by an <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code>.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1144">code &raquo;</a><a class="member" name="webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a> : <code class="type">{clearInterval: function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>), clearTimeout: function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>), setInterval: function(!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, setTimeout: function(!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}</code></div><div>No description.</div></summary></details></div></div></section><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">webdriver.promise.ControlFlow</code></h3><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1591">code &raquo;</a><span class="member"><a name="abortFrame_">abortFrame_</a> <span class="args">( error )</span></span></div><p>Aborts the current frame. The frame, and all of the tasks scheduled within it
27
27
  will be discarded. If this instance does not have an active frame, it will
28
28
  immediately terminate all execution.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>error: <code class="type">*</code><dd>The reason the frame is being aborted; typically either
29
- an Error or string.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1736">code &raquo;</a><span class="member"><a name="abortNow_">abortNow_</a> <span class="args">( error )</span></span></div><p>Aborts this flow, abandoning all remaining tasks. If there are
29
+ an Error or string.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1752">code &raquo;</a><span class="member"><a name="abortNow_">abortNow_</a> <span class="args">( error )</span></span></div><p>Aborts this flow, abandoning all remaining tasks. If there are
30
30
  listeners registered, an <code >UNCAUGHT_EXCEPTION</code> will be emitted with the
31
31
  offending <code >error</code>, otherwise, the <code >error</code> will be rethrown to the
32
32
  global error handler.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>error: <code class="type">*</code><dd>Object describing the error that caused the flow to
33
- abort; usually either an Error or string value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1276">code &raquo;</a><span class="member"><a name="annotateError">annotateError</a> <span class="args">( e )</span> &rArr; <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a>|<a href="class_goog_testing_JsUnitException.html">goog.testing.JsUnitException</a>)</code></span></div><p>Appends a summary of this instance's recent task history to the given
33
+ abort; usually either an Error or string value.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1288">code &raquo;</a><span class="member"><a name="annotateError">annotateError</a> <span class="args">( e )</span> &rArr; <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a>|<a href="class_goog_testing_JsUnitException.html">goog.testing.JsUnitException</a>)</code></span></div><p>Appends a summary of this instance's recent task history to the given
34
34
  error's stack trace. This function will also ensure the error's stack trace
35
- is in canonical form.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>e: <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a>|<a href="class_goog_testing_JsUnitException.html">goog.testing.JsUnitException</a>)</code><dd>The error to annotate.</dl><tr><th>Returns<tr><td><dl>The annotated error.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1430">code &raquo;</a><span class="member"><a name="await">await</a> <span class="args">( promise )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a task that will wait for another promise to resolve. The resolved
35
+ is in canonical form.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>e: <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a>|<a href="class_goog_testing_JsUnitException.html">goog.testing.JsUnitException</a>)</code><dd>The error to annotate.</dl><tr><th>Returns<tr><td><dl>The annotated error.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1443">code &raquo;</a><span class="member"><a name="await">await</a> <span class="args">( promise )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a task that will wait for another promise to resolve. The resolved
36
36
  promise's value will be returned as the task result.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>promise: <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd>The promise to wait on.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve when the
37
- task has completed.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1454">code &raquo;</a><span class="member"><a name="cancelEventLoop_">cancelEventLoop_</a> <span class="args">( )</span></span></div><p>Cancels the event loop, if necessary.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1719">code &raquo;</a><span class="member"><a name="cancelShutdown_">cancelShutdown_</a> <span class="args">( )</span></span></div><p>Cancels the shutdown sequence if it is currently scheduled.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1238">code &raquo;</a><span class="member"><a name="clearHistory">clearHistory</a> <span class="args">( )</span></span></div><p>Clears this instance's task history.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1696">code &raquo;</a><span class="member"><a name="commenceShutdown_">commenceShutdown_</a> <span class="args">( )</span></span></div><p>Commences the shutdown sequence for this instance. After one turn of the
37
+ task has completed.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1467">code &raquo;</a><span class="member"><a name="cancelEventLoop_">cancelEventLoop_</a> <span class="args">( )</span></span></div><p>Cancels the event loop, if necessary.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1735">code &raquo;</a><span class="member"><a name="cancelShutdown_">cancelShutdown_</a> <span class="args">( )</span></span></div><p>Cancels the shutdown sequence if it is currently scheduled.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1250">code &raquo;</a><span class="member"><a name="clearHistory">clearHistory</a> <span class="args">( )</span></span></div><p>Clears this instance's task history.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1712">code &raquo;</a><span class="member"><a name="commenceShutdown_">commenceShutdown_</a> <span class="args">( )</span></span></div><p>Commences the shutdown sequence for this instance. After one turn of the
38
38
  event loop, this object will emit the
39
39
  <code class="type"><a href="enum_webdriver_promise_ControlFlow_EventType.html#webdriver.promise.ControlFlow.EventType.IDLE">webdriver.promise.ControlFlow.EventType.IDLE</a></code> event to signal
40
40
  listeners that it has completed. During this wait, if another task is
41
- scheduled, the shutdown will be aborted.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1320">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="execute">execute</a> <span class="args">( fn, opt_description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;</code></span></div><p>Schedules a task for execution. If there is nothing currently in the
41
+ scheduled, the shutdown will be aborted.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1332">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="execute">execute</a> <span class="args">( fn, opt_description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;</code></span></div><p>Schedules a task for execution. If there is nothing currently in the
42
42
  queue, the task will be executed in the next turn of the event loop. If
43
43
  the task function is a generator, the task will be executed using
44
44
  <code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.consume">webdriver.promise.consume</a></code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type">function(): (T|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;)</code><dd>The function to
45
45
  call to start the task. If the function returns a
46
46
  <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code>, this instance will wait for it to be
47
47
  resolved before starting the next task.<dt>opt_description: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A description of the task.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
48
- with the result of the action.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1217">code &raquo;</a><span class="member"><a name="getHistory">getHistory</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Returns a summary of the recent task activity for this instance. This
48
+ with the result of the action.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1229">code &raquo;</a><span class="member"><a name="getHistory">getHistory</a> <span class="args">( )</span> &rArr; <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.&lt;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></span></div><p>Returns a summary of the recent task activity for this instance. This
49
49
  includes the most recently completed task, as well as any parent tasks. In
50
50
  the returned summary, the task at index N is considered a sub-task of the
51
51
  task at index N+1.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A summary of this instance's recent task
52
- activity.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1526">code &raquo;</a><span class="member"><a name="getNextTask_">getNextTask_</a> <span class="args">( )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Task_.html">webdriver.promise.Task_</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The next task to execute, or
53
- <code >null</code> if a frame was resolved.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1300">code &raquo;</a><span class="member"><a name="getSchedule">getSchedule</a> <span class="args">( )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The scheduled tasks still pending with this instance.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1199">code &raquo;</a><span class="member"><a name="reset">reset</a> <span class="args">( )</span></span></div><p>Resets this instance, clearing its queue and removing all event listeners.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1549">code &raquo;</a><span class="member"><a name="resolveFrame_">resolveFrame_</a> <span class="args">( frame )</span></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>frame: <code class="type">!<a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code><dd>The frame to resolve.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1469">code &raquo;</a><span class="member"><a name="runEventLoop_">runEventLoop_</a> <span class="args">( )</span></span></div><p>Executes the next task for the current frame. If the current frame has no
52
+ activity.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1539">code &raquo;</a><span class="member"><a name="getNextTask_">getNextTask_</a> <span class="args">( )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Task_.html">webdriver.promise.Task_</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The next task to execute, or
53
+ <code >null</code> if a frame was resolved.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1312">code &raquo;</a><span class="member"><a name="getSchedule">getSchedule</a> <span class="args">( )</span> &rArr; <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The scheduled tasks still pending with this instance.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1211">code &raquo;</a><span class="member"><a name="reset">reset</a> <span class="args">( )</span></span></div><p>Resets this instance, clearing its queue and removing all event listeners.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1563">code &raquo;</a><span class="member"><a name="resolveFrame_">resolveFrame_</a> <span class="args">( frame )</span></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>frame: <code class="type">!<a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code><dd>The frame to resolve.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1482">code &raquo;</a><span class="member"><a name="runEventLoop_">runEventLoop_</a> <span class="args">( )</span></span></div><p>Executes the next task for the current frame. If the current frame has no
54
54
  more tasks, the frame's result will be resolved, returning control to the
55
55
  frame's creator. This will terminate the flow if the completed frame was at
56
- the top of the stack.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1618">code &raquo;</a><span class="member"><a name="runInNewFrame_">runInNewFrame_</a> <span class="args">( fn, callback, errback, opt_activate )</span></span></div><p>Executes a function in a new frame. If the function does not schedule any new
56
+ the top of the stack.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1632">code &raquo;</a><span class="member"><a name="runInNewFrame_">runInNewFrame_</a> <span class="args">( fn, callback, errback, opt_activate )</span></span></div><p>Executes a function in a new frame. If the function does not schedule any new
57
57
  tasks, the frame will be discarded and the function's result returned
58
58
  immediately. Otherwise, a promise will be returned. This promise will be
59
59
  resolved with the function's result once all of the tasks scheduled within
60
60
  the function have been completed. If the function's frame is aborted, the
61
61
  returned promise will be rejected.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>fn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to execute.<dt>callback: <code class="type">function(*)</code><dd>The function to call with a successful result.<dt>errback: <code class="type">function(*)</code><dd>The function to call if there is an error.<dt>opt_activate: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether the active frame should be updated to
62
- the newly created frame so tasks are treated as sub-tasks.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1441">code &raquo;</a><span class="member"><a name="scheduleEventLoopStart_">scheduleEventLoopStart_</a> <span class="args">( )</span></span></div><p>Schedules the interval for this instance's event loop, if necessary.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1356">code &raquo;</a><span class="member"><a name="timeout">timeout</a> <span class="args">( ms, opt_description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Inserts a <code >setTimeout</code> into the command queue. This is equivalent to
62
+ the newly created frame so tasks are treated as sub-tasks.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1454">code &raquo;</a><span class="member"><a name="scheduleEventLoopStart_">scheduleEventLoopStart_</a> <span class="args">( )</span></span></div><p>Schedules the interval for this instance's event loop, if necessary.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1368">code &raquo;</a><span class="member"><a name="timeout">timeout</a> <span class="args">( ms, opt_description )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Inserts a <code >setTimeout</code> into the command queue. This is equivalent to
63
63
  a thread sleep in a synchronous programming language.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>ms: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The timeout delay, in milliseconds.<dt>opt_description: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A description to accompany the timeout.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved with
64
- the result of the action.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1248">code &raquo;</a><span class="member"><a name="trimHistory_">trimHistory_</a> <span class="args">( )</span></span></div><p>Removes a completed task from this instance's history record. If any
65
- tasks remain from aborted frames, those will be removed as well.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1388">code &raquo;</a><span class="member"><a name="wait">wait</a> <span class="args">( condition, timeout, opt_message )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a task that shall wait for a condition to hold. Each condition
64
+ the result of the action.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1260">code &raquo;</a><span class="member"><a name="trimHistory_">trimHistory_</a> <span class="args">( )</span></span></div><p>Removes a completed task from this instance's history record. If any
65
+ tasks remain from aborted frames, those will be removed as well.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1401">code &raquo;</a><code class="type">&lt;T&gt;</code> <span class="member"><a name="wait">wait</a> <span class="args">( condition, timeout, opt_message )</span> &rArr; <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.&lt;T&gt;</code></span></div><p>Schedules a task that shall wait for a condition to hold. Each condition
66
66
  function may return any value, but it will always be evaluated as a boolean.
67
67
 
68
68
  <p>Condition functions may schedule sub-tasks with this instance, however,
@@ -74,35 +74,35 @@
74
74
  out.
75
75
 
76
76
  <p>If the condition function throws, or returns a rejected promise, the
77
- wait task will fail.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>condition: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The condition function to poll.<dt>timeout: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>How long to wait, in milliseconds, for the condition
77
+ wait task will fail.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>condition: <code class="type">function(): T</code><dd>The condition function to poll.<dt>timeout: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>How long to wait, in milliseconds, for the condition
78
78
  to hold before timing out.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>An optional error message to include if the
79
- wait times out; defaults to the empty string.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved when the
80
- condition has been satisified. The promise shall be rejected if the wait
81
- times out waiting for the condition.</dl></table></div></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l116">code &raquo;</a><span class="member"><a name="addListener">addListener</a> <span class="args">( type, listenerFn, opt_scope )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Registers a listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l90">code &raquo;</a><span class="member"><a name="addListener_">addListener_</a> <span class="args">( type, listenerFn, opt_scope, opt_oneshot )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Registers a listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.<dt>opt_oneshot: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether the listener should be removed after
79
+ wait times out; defaults to the empty string.</dl><tr><th>Returns<tr><td><dl>A promise that will be fulfilled
80
+ when the condition has been satisified. The promise shall be rejected if
81
+ the wait times out waiting for the condition.</dl></table></div></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l116">code &raquo;</a><span class="member"><a name="addListener">addListener</a> <span class="args">( type, listenerFn, opt_scope )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Registers a listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l90">code &raquo;</a><span class="member"><a name="addListener_">addListener_</a> <span class="args">( type, listenerFn, opt_scope, opt_oneshot )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Registers a listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.<dt>opt_oneshot: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether the listener should be removed after
82
82
  the first event is fired.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l44">code &raquo;</a><span class="member"><a name="emit">emit</a> <span class="args">( type, var_args )</span></span></div><p>Fires an event and calls all listeners.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to emit.<dt>var_args: <code class="type">...*</code><dd>Any arguments to pass to each listener.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l71">code &raquo;</a><span class="member"><a name="listeners">listeners</a> <span class="args">( type )</span> &rArr; <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>Returns a mutable list of listeners for a specific type of event.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to retrieve the listeners for.</dl><tr><th>Returns<tr><td><dl>The registered listeners for
83
83
  the given event type.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l142">code &raquo;</a><span class="member"><a name="on">on</a> <span class="args">( type, listenerFn, opt_scope )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>An alias for <code >#addListener()</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l130">code &raquo;</a><span class="member"><a name="once">once</a> <span class="args">( type, listenerFn, opt_scope )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Registers a one-time listener which will be called only the first time an
84
84
  event is emitted, after which it will be removed.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to listen for.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The function to invoke when the event is fired.<dt>opt_scope: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object in whose scope to invoke the listener.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l173">code &raquo;</a><span class="member"><a name="removeAllListeners">removeAllListeners</a> <span class="args">( opt_type )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Removes all listeners for a specific type of event. If no event is
85
- specified, all listeners across all types will be removed.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The type of event to remove listeners from.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l152">code &raquo;</a><span class="member"><a name="removeListener">removeListener</a> <span class="args">( type, listenerFn )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Removes a previously registered event listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to unregister.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The handler function to remove.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type">webdriver.promise.ControlFlow</code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1126">code &raquo;</a><span class="member"><a name="activeFrame_">activeFrame_</a> : <code class="type"><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code></span></div><p>Tracks the active execution frame for this instance. Lazily initialized
86
- when the first task is scheduled.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1166">code &raquo;</a><span class="member"><a name="eventLoopId_">eventLoopId_</a> : <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Interval ID for this instance's event loop.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1046">code &raquo;</a><span class="member"><a name="history_">history_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>A list of recent tasks. Each time a new task is started, or a frame is
85
+ specified, all listeners across all types will be removed.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The type of event to remove listeners from.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l152">code &raquo;</a><span class="member"><a name="removeListener">removeListener</a> <span class="args">( type, listenerFn )</span> &rArr; <code class="type">!<a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></span></div><p>Removes a previously registered event listener.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The type of event to unregister.<dt>listenerFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The handler function to remove.</dl><tr><th>Returns<tr><td><dl>A self reference.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type">webdriver.promise.ControlFlow</code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1071">code &raquo;</a><span class="member"><a name="activeFrame_">activeFrame_</a> : <code class="type"><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code></span></div><p>Tracks the active execution frame for this instance. Lazily initialized
86
+ when the first task is scheduled.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1108">code &raquo;</a><span class="member"><a name="eventLoopId_">eventLoopId_</a> : <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Interval ID for this instance's event loop.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1064">code &raquo;</a><span class="member"><a name="history_">history_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>A list of recent tasks. Each time a new task is started, or a frame is
87
87
  completed, the previously recorded task is removed from this list. If
88
88
  there are multiple tasks, task N+1 is considered a sub-task of task
89
- N.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1193">code &raquo;</a><span class="member"><a name="numAbortedFrames_">numAbortedFrames_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of aborted frames since the last time a task was executed or a
90
- frame completed successfully.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1185">code &raquo;</a><span class="member"><a name="pendingRejections_">pendingRejections_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of "pending" promise rejections.
89
+ N.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1133">code &raquo;</a><span class="member"><a name="numAbortedFrames_">numAbortedFrames_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of aborted frames since the last time a task was executed or a
90
+ frame completed successfully.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1126">code &raquo;</a><span class="member"><a name="pendingRejections_">pendingRejections_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>The number of "pending" promise rejections.
91
91
 
92
- <p>Each time a promise is rejected and is not handled by a listener, it will
93
- schedule a 0-based timeout to check if it is still unrejected in the next
94
- turn of the JS-event loop. This allows listeners to attach to, and handle,
95
- the rejected promise at any point in same turn of the event loop that the
96
- promise was rejected.
92
+ <p>Each time a promise is rejected and is not handled by a listener, it
93
+ will schedule a 0-based timeout to check if it is still unrejected in the
94
+ next turn of the JS-event loop. This allows listeners to attach to, and
95
+ handle, the rejected promise at any point in same turn of the event loop
96
+ that the promise was rejected.
97
97
 
98
98
  <p>When this flow's own event loop triggers, it will not run if there
99
99
  are any outstanding promise rejections. This allows unhandled promises to
100
- be reported before a new task is started, ensuring the error is reported to
101
- the current task queue.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1138">code &raquo;</a><span class="member"><a name="schedulingFrame_">schedulingFrame_</a> : <code class="type"><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code></span></div><p>A reference to the frame in which new tasks should be scheduled. If
100
+ be reported before a new task is started, ensuring the error is reported
101
+ to the current task queue.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1082">code &raquo;</a><span class="member"><a name="schedulingFrame_">schedulingFrame_</a> : <code class="type"><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a></code></span></div><p>A reference to the frame in which new tasks should be scheduled. If
102
102
  <code >null</code>, tasks will be scheduled within the active frame. When forcing
103
103
  a function to run in the context of a new frame, this pointer is used to
104
104
  ensure tasks are scheduled within the newly created frame, even though it
105
- won't be active yet.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1159">code &raquo;</a><span class="member"><a name="shutdownId_">shutdownId_</a> : <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Timeout ID set when the flow is about to shutdown without any errors
105
+ won't be active yet.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1102">code &raquo;</a><span class="member"><a name="shutdownId_">shutdownId_</a> : <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Timeout ID set when the flow is about to shutdown without any errors
106
106
  being detected. Upon shutting down, the flow will emit an
107
107
  <code class="type"><a href="enum_webdriver_promise_ControlFlow_EventType.html#webdriver.promise.ControlFlow.EventType.IDLE">webdriver.promise.ControlFlow.EventType.IDLE</a></code> event. Idle events
108
108
  always follow a brief timeout in order to catch latent errors from the last
@@ -115,5 +115,5 @@
115
115
  function() { return webdriver.promise.rejected('failed'); });
116
116
  // Set a callback on the result. This delays reporting the unhandled
117
117
  // failure for 1 turn of the event loop.
118
- result.then(goog.nullFunction);</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1037">code &raquo;</a><span class="member"><a name="timer">timer</a> : <code class="type"><a href="class_webdriver_promise_ControlFlow.html#webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a></code></span></div><p>The timer used by this instance.</summary></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l35">code &raquo;</a><span class="member"><a name="events_">events_</a> : <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>Map of events to registered listeners.</summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1265">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.ANNOTATION_PROPERTY_">webdriver.promise.ControlFlow.ANNOTATION_PROPERTY_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Property used to track whether an error has been annotated by
119
- <code class="type"><a href="class_webdriver_promise_ControlFlow.html#annotateError">webdriver.promise.ControlFlow#annotateError</a></code>.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1118">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.EVENT_LOOP_FREQUENCY">webdriver.promise.ControlFlow.EVENT_LOOP_FREQUENCY</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>How often, in milliseconds, the event loop should run.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1064">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.defaultTimer">webdriver.promise.ControlFlow.defaultTimer</a> : <code class="type"><a href="class_webdriver_promise_ControlFlow.html#webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a></code></span></div><p>The default timer object, which uses the global timer functions.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1030">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.superClass_">webdriver.promise.ControlFlow.superClass_</a> : <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>
118
+ result.then(goog.nullFunction);</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1055">code &raquo;</a><span class="member"><a name="timer">timer</a> : <code class="type"><a href="class_webdriver_promise_ControlFlow.html#webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a></code></span></div><p>The timer used by this instance.</summary></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter</a></code></h3><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/events.js.src.html#l35">code &raquo;</a><span class="member"><a name="events_">events_</a> : <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code></span></div><p>Map of events to registered listeners.</summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1277">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.ANNOTATION_PROPERTY_">webdriver.promise.ControlFlow.ANNOTATION_PROPERTY_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Property used to track whether an error has been annotated by
119
+ <code class="type"><a href="class_webdriver_promise_ControlFlow.html#annotateError">webdriver.promise.ControlFlow#annotateError</a></code>.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1205">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.EVENT_LOOP_FREQUENCY">webdriver.promise.ControlFlow.EVENT_LOOP_FREQUENCY</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>How often, in milliseconds, the event loop should run.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1151">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.defaultTimer">webdriver.promise.ControlFlow.defaultTimer</a> : <code class="type"><a href="class_webdriver_promise_ControlFlow.html#webdriver.promise.ControlFlow.Timer">webdriver.promise.ControlFlow.Timer</a></code></span></div><p>The default timer object, which uses the global timer functions.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l1048">code &raquo;</a><span class="member"><a name="webdriver.promise.ControlFlow.superClass_">webdriver.promise.ControlFlow.superClass_</a> : <code class="type"><a href="class_webdriver_EventEmitter.html">webdriver.EventEmitter.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>