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.
- package/CHANGES.md +20 -0
- package/README.md +8 -13
- package/builder.js +4 -3
- package/docs/class_webdriver_Alert.html +6 -6
- package/docs/class_webdriver_AlertPromise.html +6 -6
- package/docs/class_webdriver_UnhandledAlertError.html +4 -4
- package/docs/class_webdriver_WebDriver.html +39 -37
- package/docs/class_webdriver_WebDriver_Logs.html +3 -3
- package/docs/class_webdriver_WebDriver_Navigation.html +5 -5
- package/docs/class_webdriver_WebDriver_Options.html +9 -9
- package/docs/class_webdriver_WebDriver_TargetLocator.html +6 -6
- package/docs/class_webdriver_WebDriver_Timeouts.html +4 -4
- package/docs/class_webdriver_WebDriver_Window.html +6 -6
- package/docs/class_webdriver_WebElement.html +23 -23
- package/docs/class_webdriver_WebElementPromise.html +22 -22
- package/docs/class_webdriver_promise_CancellationError.html +3 -0
- package/docs/class_webdriver_promise_ControlFlow.html +32 -32
- package/docs/class_webdriver_promise_Deferred.html +7 -8
- package/docs/class_webdriver_promise_Frame_.html +14 -30
- package/docs/class_webdriver_promise_Promise.html +2 -2
- package/docs/class_webdriver_promise_Task_.html +12 -12
- package/docs/class_webdriver_until_Condition.html +3 -0
- package/docs/enum_webdriver_Key.html +1 -1
- package/docs/enum_webdriver_promise_ControlFlow_EventType.html +1 -1
- package/docs/enum_webdriver_promise_Deferred_State_.html +1 -1
- package/docs/index.html +8 -13
- package/docs/interface_webdriver_promise_Thenable.html +8 -10
- package/docs/license.html +1 -1
- package/docs/module_selenium-webdriver.html +2 -2
- package/docs/module_selenium-webdriver__base.html +1 -1
- package/docs/module_selenium-webdriver__base_class_Context.html +1 -1
- package/docs/module_selenium-webdriver_builder.html +1 -1
- package/docs/module_selenium-webdriver_builder_class_Builder.html +1 -1
- package/docs/module_selenium-webdriver_chrome.html +1 -1
- package/docs/module_selenium-webdriver_chrome_class_Driver.html +2 -2
- package/docs/module_selenium-webdriver_chrome_class_Options.html +2 -2
- package/docs/module_selenium-webdriver_chrome_class_ServiceBuilder.html +1 -1
- package/docs/module_selenium-webdriver_error.html +1 -1
- package/docs/module_selenium-webdriver_executors.html +1 -1
- package/docs/module_selenium-webdriver_firefox.html +1 -1
- package/docs/module_selenium-webdriver_firefox_binary.html +1 -1
- package/docs/module_selenium-webdriver_firefox_binary_class_Binary.html +1 -1
- package/docs/module_selenium-webdriver_firefox_class_Driver.html +2 -2
- package/docs/module_selenium-webdriver_firefox_class_Options.html +1 -1
- package/docs/module_selenium-webdriver_firefox_extension.html +1 -1
- package/docs/module_selenium-webdriver_firefox_profile.html +1 -1
- package/docs/module_selenium-webdriver_firefox_profile_class_Profile.html +1 -1
- package/docs/module_selenium-webdriver_http.html +1 -1
- package/docs/module_selenium-webdriver_http_class_HttpClient.html +1 -1
- package/docs/module_selenium-webdriver_http_util.html +1 -1
- package/docs/module_selenium-webdriver_io.html +1 -1
- package/docs/module_selenium-webdriver_io_exec.html +1 -1
- package/docs/module_selenium-webdriver_net.html +1 -1
- package/docs/module_selenium-webdriver_net_portprober.html +1 -1
- package/docs/module_selenium-webdriver_phantomjs.html +1 -1
- package/docs/module_selenium-webdriver_phantomjs_class_Driver.html +2 -2
- package/docs/module_selenium-webdriver_proxy.html +1 -1
- package/docs/module_selenium-webdriver_remote.html +1 -1
- package/docs/module_selenium-webdriver_remote_class_DriverService.html +2 -2
- package/docs/module_selenium-webdriver_remote_class_SeleniumServer.html +2 -2
- package/docs/module_selenium-webdriver_testing.html +16 -29
- package/docs/module_selenium-webdriver_testing_assert.html +1 -1
- package/docs/namespace_webdriver_promise.html +18 -20
- package/docs/namespace_webdriver_stacktrace.html +15 -15
- package/docs/namespace_webdriver_until.html +32 -0
- package/docs/source/_base.js.src.html +1 -1
- package/docs/source/builder.js.src.html +1 -1
- package/docs/source/chrome.js.src.html +1 -1
- package/docs/source/error.js.src.html +1 -1
- package/docs/source/executors.js.src.html +1 -1
- package/docs/source/firefox/binary.js.src.html +1 -1
- package/docs/source/firefox/extension.js.src.html +1 -1
- package/docs/source/firefox/index.js.src.html +1 -1
- package/docs/source/firefox/profile.js.src.html +1 -1
- package/docs/source/http/index.js.src.html +1 -1
- package/docs/source/http/util.js.src.html +1 -1
- package/docs/source/index.js.src.html +1 -1
- package/docs/source/io/exec.js.src.html +1 -1
- package/docs/source/io/index.js.src.html +1 -1
- package/docs/source/lib/atoms/error.js.src.html +1 -1
- package/docs/source/lib/atoms/json.js.src.html +1 -1
- package/docs/source/lib/atoms/response.js.src.html +1 -1
- package/docs/source/lib/atoms/userAgent.js.src.html +1 -1
- package/docs/source/lib/goog/array/array.js.src.html +1 -1
- package/docs/source/lib/goog/asserts/asserts.js.src.html +1 -1
- package/docs/source/lib/goog/async/nexttick.js.src.html +1 -1
- package/docs/source/lib/goog/async/run.js.src.html +1 -1
- package/docs/source/lib/goog/base.js.src.html +1 -1
- package/docs/source/lib/goog/debug/debug.js.src.html +1 -1
- package/docs/source/lib/goog/debug/entrypointregistry.js.src.html +1 -1
- package/docs/source/lib/goog/debug/error.js.src.html +1 -1
- package/docs/source/lib/goog/debug/logbuffer.js.src.html +1 -1
- package/docs/source/lib/goog/debug/logger.js.src.html +1 -1
- package/docs/source/lib/goog/debug/logrecord.js.src.html +1 -1
- package/docs/source/lib/goog/deps.js.src.html +1 -1
- package/docs/source/lib/goog/disposable/disposable.js.src.html +1 -1
- package/docs/source/lib/goog/disposable/idisposable.js.src.html +1 -1
- package/docs/source/lib/goog/dom/browserfeature.js.src.html +1 -1
- package/docs/source/lib/goog/dom/dom.js.src.html +1 -1
- package/docs/source/lib/goog/dom/nodetype.js.src.html +1 -1
- package/docs/source/lib/goog/dom/tagname.js.src.html +1 -1
- package/docs/source/lib/goog/dom/vendor.js.src.html +1 -1
- package/docs/source/lib/goog/events/browserevent.js.src.html +1 -1
- package/docs/source/lib/goog/events/browserfeature.js.src.html +1 -1
- package/docs/source/lib/goog/events/event.js.src.html +1 -1
- package/docs/source/lib/goog/events/eventid.js.src.html +1 -1
- package/docs/source/lib/goog/events/events.js.src.html +1 -1
- package/docs/source/lib/goog/events/eventtarget.js.src.html +1 -1
- package/docs/source/lib/goog/events/eventtype.js.src.html +1 -1
- package/docs/source/lib/goog/events/keycodes.js.src.html +1 -1
- package/docs/source/lib/goog/events/listenable.js.src.html +1 -1
- package/docs/source/lib/goog/events/listener.js.src.html +1 -1
- package/docs/source/lib/goog/events/listenermap.js.src.html +1 -1
- package/docs/source/lib/goog/functions/functions.js.src.html +1 -1
- package/docs/source/lib/goog/iter/iter.js.src.html +1 -1
- package/docs/source/lib/goog/json/json.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/assertthat.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/logicmatcher.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/matcher.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/numbermatcher.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/objectmatcher.js.src.html +1 -1
- package/docs/source/lib/goog/labs/testing/stringmatcher.js.src.html +1 -1
- package/docs/source/lib/goog/labs/useragent/browser.js.src.html +1 -1
- package/docs/source/lib/goog/labs/useragent/engine.js.src.html +1 -1
- package/docs/source/lib/goog/labs/useragent/util.js.src.html +1 -1
- package/docs/source/lib/goog/math/box.js.src.html +1 -1
- package/docs/source/lib/goog/math/coordinate.js.src.html +1 -1
- package/docs/source/lib/goog/math/math.js.src.html +1 -1
- package/docs/source/lib/goog/math/rect.js.src.html +1 -1
- package/docs/source/lib/goog/math/size.js.src.html +1 -1
- package/docs/source/lib/goog/net/wrapperxmlhttpfactory.js.src.html +1 -1
- package/docs/source/lib/goog/net/xhrlike.js.src.html +1 -1
- package/docs/source/lib/goog/net/xmlhttp.js.src.html +1 -1
- package/docs/source/lib/goog/net/xmlhttpfactory.js.src.html +1 -1
- package/docs/source/lib/goog/object/object.js.src.html +1 -1
- package/docs/source/lib/goog/reflect/reflect.js.src.html +1 -1
- package/docs/source/lib/goog/string/string.js.src.html +1 -1
- package/docs/source/lib/goog/structs/collection.js.src.html +1 -1
- package/docs/source/lib/goog/structs/map.js.src.html +1 -1
- package/docs/source/lib/goog/structs/set.js.src.html +1 -1
- package/docs/source/lib/goog/structs/structs.js.src.html +1 -1
- package/docs/source/lib/goog/style/style.js.src.html +1 -1
- package/docs/source/lib/goog/testing/asserts.js.src.html +1 -1
- package/docs/source/lib/goog/testing/asynctestcase.js.src.html +1 -1
- package/docs/source/lib/goog/testing/events/events.js.src.html +1 -1
- package/docs/source/lib/goog/testing/functionmock.js.src.html +1 -1
- package/docs/source/lib/goog/testing/jsunit.js.src.html +1 -1
- package/docs/source/lib/goog/testing/loosemock.js.src.html +1 -1
- package/docs/source/lib/goog/testing/mock.js.src.html +1 -1
- package/docs/source/lib/goog/testing/mockclock.js.src.html +1 -1
- package/docs/source/lib/goog/testing/mockcontrol.js.src.html +1 -1
- package/docs/source/lib/goog/testing/mockinterface.js.src.html +1 -1
- package/docs/source/lib/goog/testing/mockmatchers.js.src.html +1 -1
- package/docs/source/lib/goog/testing/objectpropertystring.js.src.html +1 -1
- package/docs/source/lib/goog/testing/propertyreplacer.js.src.html +1 -1
- package/docs/source/lib/goog/testing/recordfunction.js.src.html +1 -1
- package/docs/source/lib/goog/testing/stacktrace.js.src.html +1 -1
- package/docs/source/lib/goog/testing/strictmock.js.src.html +1 -1
- package/docs/source/lib/goog/testing/testcase.js.src.html +1 -1
- package/docs/source/lib/goog/testing/testrunner.js.src.html +1 -1
- package/docs/source/lib/goog/testing/watchers.js.src.html +1 -1
- package/docs/source/lib/goog/uri/uri.js.src.html +1 -1
- package/docs/source/lib/goog/uri/utils.js.src.html +1 -1
- package/docs/source/lib/goog/useragent/product.js.src.html +1 -1
- package/docs/source/lib/goog/useragent/product_isversion.js.src.html +1 -1
- package/docs/source/lib/goog/useragent/useragent.js.src.html +1 -1
- package/docs/source/lib/webdriver/abstractbuilder.js.src.html +1 -1
- package/docs/source/lib/webdriver/actionsequence.js.src.html +1 -1
- package/docs/source/lib/webdriver/builder.js.src.html +1 -1
- package/docs/source/lib/webdriver/button.js.src.html +1 -1
- package/docs/source/lib/webdriver/capabilities.js.src.html +1 -1
- package/docs/source/lib/webdriver/command.js.src.html +1 -1
- package/docs/source/lib/webdriver/events.js.src.html +1 -1
- package/docs/source/lib/webdriver/firefoxdomexecutor.js.src.html +1 -1
- package/docs/source/lib/webdriver/http/corsclient.js.src.html +1 -1
- package/docs/source/lib/webdriver/http/http.js.src.html +1 -1
- package/docs/source/lib/webdriver/http/xhrclient.js.src.html +1 -1
- package/docs/source/lib/webdriver/key.js.src.html +1 -1
- package/docs/source/lib/webdriver/locators.js.src.html +1 -1
- package/docs/source/lib/webdriver/logging.js.src.html +1 -1
- package/docs/source/lib/webdriver/process.js.src.html +1 -1
- package/docs/source/lib/webdriver/promise.js.src.html +1 -1
- package/docs/source/lib/webdriver/session.js.src.html +1 -1
- package/docs/source/lib/webdriver/stacktrace.js.src.html +1 -1
- package/docs/source/lib/webdriver/testing/asserts.js.src.html +1 -1
- package/docs/source/lib/webdriver/testing/testcase.js.src.html +1 -1
- package/docs/source/lib/webdriver/until.js.src.html +1 -0
- package/docs/source/lib/webdriver/webdriver.js.src.html +1 -1
- package/docs/source/net/index.js.src.html +1 -1
- package/docs/source/net/portprober.js.src.html +1 -1
- package/docs/source/phantomjs.js.src.html +1 -1
- package/docs/source/proxy.js.src.html +1 -1
- package/docs/source/remote/index.js.src.html +1 -1
- package/docs/source/testing/assert.js.src.html +1 -1
- package/docs/source/testing/index.js.src.html +1 -1
- package/docs/types.js +1 -1
- package/example/google_search.js +9 -17
- package/example/google_search_generator.js +6 -7
- package/example/google_search_test.js +10 -18
- package/example/parallel_flows.js +4 -7
- package/index.js +6 -0
- package/lib/firefox/webdriver.xpi +0 -0
- package/lib/goog/deps.js +7 -5
- package/lib/test/index.js +0 -8
- package/lib/webdriver/promise.js +263 -251
- package/lib/webdriver/stacktrace.js +15 -1
- package/lib/webdriver/test/promise_flow_test.js +82 -76
- package/lib/webdriver/test/promise_test.js +22 -62
- package/lib/webdriver/test/stacktrace_test.js +18 -0
- package/lib/webdriver/test/until_test.js +388 -0
- package/lib/webdriver/test/webdriver_test.js +41 -0
- package/lib/webdriver/until.js +408 -0
- package/lib/webdriver/webdriver.js +91 -29
- package/package.json +2 -2
- package/test/element_finding_test.js +6 -6
- package/test/http/util_test.js +4 -5
- package/test/page_loading_test.js +7 -7
- package/test/stale_element_test.js +2 -10
- package/testing/index.js +9 -22
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.promise</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace webdriver.promise</h1><a class="source" href="source/lib/webdriver/promise.js.src.html#l49">code »</a></header><section></section><section><h2>Interfaces</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="interface_webdriver_promise_Thenable.html">webdriver.promise.Thenable</a><dd>Thenable is a promise-like object with a <code >then</code> method which may be
|
|
2
|
-
used to schedule callbacks on a promised value.</dl></table></div></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="
|
|
3
|
-
|
|
4
|
-
asynchronous operation.<dt><a href="class_webdriver_promise_Deferred.html">webdriver.promise.Deferred</a><dd>Represents a value that will be resolved at some point in the future.<dt><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a><dd>An execution frame within a <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code>.<dt><a href="class_webdriver_promise_Node_.html">webdriver.promise.Node_</a><dd>A single node in an <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code>'s task tree.<dt><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><dd>Represents the eventual value of a completed operation.<dt><a href="class_webdriver_promise_Task_.html">webdriver.promise.Task_</a><dd>A task to be executed by a <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="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l777">code »</a><code class="type"><T></code> <span class="member"><a name="webdriver.promise.all">webdriver.promise.all</a> <span class="args">( arr )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Given an array of promises, will return a promise that will be fulfilled
|
|
2
|
+
used to schedule callbacks on a promised value.</dl></table></div></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_promise_CancellationError.html">webdriver.promise.CancellationError</a><dd>Error used when the computation of a promise is cancelled.<dt><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a><dd>Handles the execution of scheduled tasks, each of which may be an
|
|
3
|
+
asynchronous operation.<dt><a href="class_webdriver_promise_Deferred.html">webdriver.promise.Deferred</a><dd>Represents a value that will be resolved at some point in the future.<dt><a href="class_webdriver_promise_Frame_.html">webdriver.promise.Frame_</a><dd>An execution frame within a <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code>.<dt><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a><dd>Represents the eventual value of a completed operation.<dt><a href="class_webdriver_promise_Task_.html">webdriver.promise.Task_</a><dd>A task to be executed by a <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="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l795">code »</a><code class="type"><T></code> <span class="member"><a name="webdriver.promise.all">webdriver.promise.all</a> <span class="args">( arr )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Given an array of promises, will return a promise that will be fulfilled
|
|
5
4
|
with the fulfillment values of the input array's values. If any of the
|
|
6
5
|
input array's promises are rejected, the returned promise will be rejected
|
|
7
6
|
with the same reason.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>arr: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>An array of
|
|
8
7
|
promises to wait on.</dl><tr><th>Returns<tr><td><dl>A promise that is
|
|
9
8
|
fulfilled with an array containing the fulfilled values of the
|
|
10
9
|
input array, or rejected with the same reason as the first
|
|
11
|
-
rejected 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#
|
|
10
|
+
rejected 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#l765">code »</a><span class="member"><a name="webdriver.promise.asap">webdriver.promise.asap</a> <span class="args">( value, callback, opt_errback )</span></span></div><p>Invokes the appropriate callback function as soon as a promised
|
|
12
11
|
<code >value</code> is resolved. This function is similar to
|
|
13
12
|
<code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.when">webdriver.promise.when</a></code>, except it does not return a new promise.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to observe.<dt>callback: <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 call when the value is
|
|
14
13
|
resolved successfully.<dt>opt_errback: <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 call when the value is
|
|
15
|
-
rejected.</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#
|
|
14
|
+
rejected.</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#l716">code »</a><span class="member"><a name="webdriver.promise.checkedNodeCall">webdriver.promise.checkedNodeCall</a> <span class="args">( fn, var_args )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Wraps a function that is assumed to be a node-style callback as its final
|
|
16
15
|
argument. This callback takes two arguments: an error value (which will be
|
|
17
16
|
null if the call succeeded), and the success value as the second argument.
|
|
18
17
|
If the call fails, the returned promise will be rejected, otherwise it will
|
|
19
18
|
be resolved with the result.</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 wrap.<dt>var_args: <code class="type">...?</code><dd>The arguments to apply to the function, excluding the
|
|
20
19
|
final callback.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved with the
|
|
21
|
-
result of the provided function's callback.</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#
|
|
20
|
+
result of the provided function's callback.</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#l2224">code »</a><span class="member"><a name="webdriver.promise.consume">webdriver.promise.consume</a> <span class="args">( generatorFn, opt_self, var_args )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Consumes a <code >GeneratorFunction</code>. Each time the generator yields a
|
|
22
21
|
promise, this function will wait for it to be fulfilled before feeding the
|
|
23
22
|
fulfilled value back into <code >next</code>. Likewise, if a yielded promise is
|
|
24
23
|
rejected, the rejection error will be passed to <code >throw</code>.
|
|
@@ -49,13 +48,12 @@
|
|
|
49
48
|
});
|
|
50
49
|
</code></pre></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>generatorFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The generator function to execute.<dt>opt_self: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>The object to use as "this" when invoking the
|
|
51
50
|
initial generator.<dt>var_args: <code class="type">...*</code><dd>Any arguments to pass to the initial generator.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve to the
|
|
52
|
-
generator's final result.</dl><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/TypeError">TypeError</a></code><dd>If the given function is not a generator.</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#
|
|
51
|
+
generator's final result.</dl><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/TypeError">TypeError</a></code><dd>If the given function is not a generator.</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#l2134">code »</a><span class="member"><a name="webdriver.promise.controlFlow">webdriver.promise.controlFlow</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The currently active control flow.</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#l2165">code »</a><span class="member"><a name="webdriver.promise.createFlow">webdriver.promise.createFlow</a> <span class="args">( callback )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Creates a new control flow. The provided callback will be invoked as the
|
|
53
52
|
first task within the new flow, with the flow as its sole argument. Returns
|
|
54
53
|
a promise that resolves to the callback result.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>callback: <code class="type">function(!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a>)</code><dd>The entry point
|
|
55
54
|
to the newly created flow.</dl><tr><th>Returns<tr><td><dl>A promise that resolves to the callback
|
|
56
|
-
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/promise.js.src.html#
|
|
57
|
-
|
|
58
|
-
resolving the promise.</dl><tr><th>Returns<tr><td><dl>The promise.</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#l856">code »</a><code class="type"><TYPE, SELF></code> <span class="member"><a name="webdriver.promise.filter">webdriver.promise.filter</a> <span class="args">( arr, fn, opt_self )</span></span></div><p>Calls a function for each element in an array, and if the function returns
|
|
55
|
+
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/promise.js.src.html#l669">code »</a><code class="type"><T></code> <span class="member"><a name="webdriver.promise.defer">webdriver.promise.defer</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Deferred.html">webdriver.promise.Deferred</a>.<T></code></span></div><p>Creates a new deferred object.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The new deferred 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/promise.js.src.html#l653">code »</a><span class="member"><a name="webdriver.promise.delayed">webdriver.promise.delayed</a> <span class="args">( ms )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Creates a promise that will be resolved at a set time in the future.</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 amount of time, in milliseconds, to wait before
|
|
56
|
+
resolving the promise.</dl><tr><th>Returns<tr><td><dl>The promise.</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#l874">code »</a><code class="type"><TYPE, SELF></code> <span class="member"><a name="webdriver.promise.filter">webdriver.promise.filter</a> <span class="args">( arr, fn, opt_self )</span></span></div><p>Calls a function for each element in an array, and if the function returns
|
|
59
57
|
true adds the element to a new array.
|
|
60
58
|
|
|
61
59
|
<p>If the return value of the filter function is a promise, this function
|
|
@@ -68,10 +66,10 @@
|
|
|
68
66
|
ignored.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>arr: <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<TYPE>|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>)</code><dd>The
|
|
69
67
|
array to iterator over, or a promise that will resolve to said array.<dt>fn: <code class="type">function(this: SELF, TYPE, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, !<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<TYPE>): (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>>)</code><dd>The function
|
|
70
68
|
to call for each element in the array.<dt>opt_self: <code class="type">SELF=</code><dd>The object to be used as the value of 'this' within
|
|
71
|
-
<code >fn</code>.</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#
|
|
72
|
-
input object once all of its values have been fully resolved.</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#
|
|
69
|
+
<code >fn</code>.</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#l680">code »</a><code class="type"><T></code> <span class="member"><a name="webdriver.promise.fulfilled">webdriver.promise.fulfilled</a> <span class="args">( opt_value )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Creates a promise that has been resolved with the given value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_value: <code class="type">T=</code><dd>The resolved value.</dl><tr><th>Returns<tr><td><dl>The resolved promise.</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#l960">code »</a><span class="member"><a name="webdriver.promise.fullyResolveKeys_">webdriver.promise.fullyResolveKeys_</a> <span class="args">( obj )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code><dd>the object to resolve.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved with the
|
|
70
|
+
input object once all of its values have been fully resolved.</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#l921">code »</a><span class="member"><a name="webdriver.promise.fullyResolveValue_">webdriver.promise.fullyResolveValue_</a> <span class="args">( value )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to fully resolve. If a promise, assumed to
|
|
73
71
|
already be resolved.</dl><tr><th>Returns<tr><td><dl>A promise for a fully resolved version
|
|
74
|
-
of the input 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#
|
|
72
|
+
of the input 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#l906">code »</a><span class="member"><a name="webdriver.promise.fullyResolved">webdriver.promise.fullyResolved</a> <span class="args">( value )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Returns a promise that will be resolved with the input value in a
|
|
75
73
|
fully-resolved state. If the value is an array, each element will be fully
|
|
76
74
|
resolved. Likewise, if the value is an object, all keys will be fully
|
|
77
75
|
resolved. In both cases, all nested arrays and objects will also be
|
|
@@ -85,9 +83,9 @@
|
|
|
85
83
|
value['self'] = value;
|
|
86
84
|
webdriver.promise.fullyResolved(value); // Stack overflow.
|
|
87
85
|
</code></pre></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to fully resolve.</dl><tr><th>Returns<tr><td><dl>A promise for a fully resolved version
|
|
88
|
-
of the input value.</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#
|
|
89
|
-
instanceof check since the value may originate from another context.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to test.</dl><tr><th>Returns<tr><td><dl>Whether the value is an 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#
|
|
90
|
-
Any object whose "then" property is a function will be considered a promise.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to test.</dl><tr><th>Returns<tr><td><dl>Whether the value is a promise.</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#
|
|
86
|
+
of the input value.</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#l622">code »</a><span class="member"><a name="webdriver.promise.isError_">webdriver.promise.isError_</a> <span class="args">( value )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Tests if a value is an Error-like object. This is more than an straight
|
|
87
|
+
instanceof check since the value may originate from another context.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to test.</dl><tr><th>Returns<tr><td><dl>Whether the value is an 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#l2179">code »</a><span class="member"><a name="webdriver.promise.isGenerator">webdriver.promise.isGenerator</a> <span class="args">( fn )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Tests is a function is a generator.</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 test.</dl><tr><th>Returns<tr><td><dl>Whether the function is a generator.</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#l639">code »</a><span class="member"><a name="webdriver.promise.isPromise">webdriver.promise.isPromise</a> <span class="args">( value )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Determines whether a <code >value</code> should be treated as a promise.
|
|
88
|
+
Any object whose "then" property is a function will be considered a promise.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to test.</dl><tr><th>Returns<tr><td><dl>Whether the value is a promise.</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#l844">code »</a><code class="type"><TYPE, SELF></code> <span class="member"><a name="webdriver.promise.map">webdriver.promise.map</a> <span class="args">( arr, fn, opt_self )</span></span></div><p>Calls a function for each element in an array and inserts the result into a
|
|
91
89
|
new array, which is used as the fulfillment value of the promise returned
|
|
92
90
|
by this function.
|
|
93
91
|
|
|
@@ -101,12 +99,12 @@
|
|
|
101
99
|
array to iterator over, or a promise that will resolve to said array.<dt>fn: <code class="type">function(this: SELF, TYPE, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, !<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<TYPE>): ?</code><dd>The
|
|
102
100
|
function to call for each element in the array. This function should
|
|
103
101
|
expect three arguments (the element, the index, and the array itself.<dt>opt_self: <code class="type">SELF=</code><dd>The object to be used as the value of 'this' within
|
|
104
|
-
<code >fn</code>.</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#
|
|
105
|
-
usually an Error or a string.</dl><tr><th>Returns<tr><td><dl>The rejected promise.</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#
|
|
102
|
+
<code >fn</code>.</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#l2151">code »</a><span class="member"><a name="webdriver.promise.popFlow_">webdriver.promise.popFlow_</a> <span class="args">( )</span></span></div></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#l2145">code »</a><span class="member"><a name="webdriver.promise.pushFlow_">webdriver.promise.pushFlow_</a> <span class="args">( flow )</span></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>flow: <code class="type">!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code><dd>The new flow.</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#l697">code »</a><code class="type"><T></code> <span class="member"><a name="webdriver.promise.rejected">webdriver.promise.rejected</a> <span class="args">( opt_reason )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Creates a promise that has been rejected with the given reason.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_reason: <code class="type">*=</code><dd>The rejection reason; may be any value, but is
|
|
103
|
+
usually an Error or a string.</dl><tr><th>Returns<tr><td><dl>The rejected promise.</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#l2123">code »</a><span class="member"><a name="webdriver.promise.setDefaultFlow">webdriver.promise.setDefaultFlow</a> <span class="args">( flow )</span></span></div><p>Changes the default flow to use when no others are active.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>flow: <code class="type">!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code><dd>The new default flow.</dl><tr><th>Throws<tr><td><dl><dt><code class="type"><a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a></code><dd>If the default flow is not currently active.</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#l742">code »</a><span class="member"><a name="webdriver.promise.when">webdriver.promise.when</a> <span class="args">( value, opt_callback, opt_errback )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Registers an observer on a promised <code >value</code>, returning a new promise
|
|
106
104
|
that will be resolved when the value is. If <code >value</code> is not a promise,
|
|
107
105
|
then the return promise will be immediately resolved.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to observe.<dt>opt_callback: <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 call when the value is
|
|
108
106
|
resolved successfully.<dt>opt_errback: <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 call when the value is
|
|
109
|
-
rejected.</dl><tr><th>Returns<tr><td><dl>A new promise.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#
|
|
107
|
+
rejected.</dl><tr><th>Returns<tr><td><dl>A new promise.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l2115">code »</a><span class="member"><a name="webdriver.promise.activeFlows_">webdriver.promise.activeFlows_</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 stack of active control flows, with the top of the stack used to schedule
|
|
110
108
|
commands. When there are multiple flows on the stack, the flow at index N
|
|
111
109
|
represents a callback triggered within a task owned by the flow at index
|
|
112
|
-
N-1.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#
|
|
110
|
+
N-1.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/promise.js.src.html#l2105">code »</a><span class="member"><a name="webdriver.promise.defaultFlow_">webdriver.promise.defaultFlow_</a> : <code class="type">!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a></code></span></div><p>The default flow to use if no others are active.</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,33 +1,33 @@
|
|
|
1
|
-
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.stacktrace</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace webdriver.stacktrace</h1><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l22">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a><dd>Class representing one stack frame.<dt><a href="class_webdriver_stacktrace_Snapshot.html">webdriver.stacktrace.Snapshot</a><dd>Stores a snapshot of the stack trace at the time this instance was created.</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="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.stacktrace</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace webdriver.stacktrace</h1><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l22">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a><dd>Class representing one stack frame.<dt><a href="class_webdriver_stacktrace_Snapshot.html">webdriver.stacktrace.Snapshot</a><dd>Stores a snapshot of the stack trace at the time this instance was created.</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="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l592">code »</a><span class="member"><a name="webdriver.stacktrace.format">webdriver.stacktrace.format</a> <span class="args">( error )</span> ⇒ <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>Formats an error's stack trace.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>error: <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 format.</dl><tr><th>Returns<tr><td><dl>The formatted 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/stacktrace.js.src.html#l662">code »</a><span class="member"><a name="webdriver.stacktrace.get">webdriver.stacktrace.get</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>Gets the native stack trace if available otherwise follows the call chain.
|
|
2
2
|
The generated trace will exclude all frames up to and including the call to
|
|
3
|
-
this function.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The frames of the stack trace.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
3
|
+
this function.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The frames of the stack trace.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l574">code »</a><span class="member"><a name="webdriver.stacktrace.getStack_">webdriver.stacktrace.getStack_</a> <span class="args">( error )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Get an error's stack trace with the error string trimmed.
|
|
4
4
|
V8 prepends the string representation of an error to its stack trace.
|
|
5
5
|
This function trims the string so that the stack trace can be parsed
|
|
6
|
-
consistently with the other JS engines.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>error: <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.</dl><tr><th>Returns<tr><td><dl>The stack trace 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/stacktrace.js.src.html#
|
|
7
|
-
parsing failed.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
8
|
-
unrecognized frames will be nulled out.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
6
|
+
consistently with the other JS engines.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>error: <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.</dl><tr><th>Returns<tr><td><dl>The stack trace 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/stacktrace.js.src.html#l549">code »</a><span class="member"><a name="webdriver.stacktrace.parseLongFirefoxFrame_">webdriver.stacktrace.parseLongFirefoxFrame_</a> <span class="args">( frameStr )</span> ⇒ <code class="type">!<a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a></code></span></div><p>Parses a long firefox stack frame.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>frameStr: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The stack frame as string.</dl><tr><th>Returns<tr><td><dl>Stack frame object.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l502">code »</a><span class="member"><a name="webdriver.stacktrace.parseStackFrame_">webdriver.stacktrace.parseStackFrame_</a> <span class="args">( frameStr )</span> ⇒ <code class="type"><a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a></code></span></div><p>Parses one stack frame.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>frameStr: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The stack frame as string.</dl><tr><th>Returns<tr><td><dl>Stack frame object or null if the
|
|
7
|
+
parsing failed.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l631">code »</a><span class="member"><a name="webdriver.stacktrace.parse_">webdriver.stacktrace.parse_</a> <span class="args">( stack )</span> ⇒ <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>Parses an Error object's stack trace.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>stack: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The stack trace.</dl><tr><th>Returns<tr><td><dl>Stack frames. The
|
|
8
|
+
unrecognized frames will be nulled out.</dl></table></div></details></div></div></section><section id="static-properties"><h2>Global Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l468">code »</a><span class="member"><a name="webdriver.stacktrace.ANONYMOUS_CLOSURE_FRAME_">webdriver.stacktrace.ANONYMOUS_CLOSURE_FRAME_</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>Representation of an anonymous frame in a stack trace generated by
|
|
9
9
|
<code class="type"><a href="namespace_goog_testing_stacktrace.html">goog.testing.stacktrace</a></code>.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l174">code »</a><span class="member"><a name="webdriver.stacktrace.ANONYMOUS_FRAME_">webdriver.stacktrace.ANONYMOUS_FRAME_</a> : <code class="type">!<a href="class_webdriver_stacktrace_Frame.html">webdriver.stacktrace.Frame</a></code></span></div><p>Constant for an anonymous frame.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l87">code »</a><span class="member"><a name="webdriver.stacktrace.BROWSER_SUPPORTED">webdriver.stacktrace.BROWSER_SUPPORTED</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether the current browser supports stack traces.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l77">code »</a><span class="member"><a name="webdriver.stacktrace.CAN_CAPTURE_STACK_TRACE_">webdriver.stacktrace.CAN_CAPTURE_STACK_TRACE_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether the current environment supports the Error.captureStackTrace
|
|
10
|
-
function (as of 10/17/2012, only V8).</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
10
|
+
function (as of 10/17/2012, only V8).</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l437">code »</a><span class="member"><a name="webdriver.stacktrace.CHAKRA_FUNCTION_CALL_PATTERN_">webdriver.stacktrace.CHAKRA_FUNCTION_CALL_PATTERN_</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>RegExp pattern for function call in a Chakra (IE) stack trace. This
|
|
11
11
|
expression creates 2 submatches on the (optional) context and function name,
|
|
12
12
|
matching identifiers like 'foo.Bar.prototype.baz', 'Anonymous function',
|
|
13
|
-
'eval code', and 'Global code'.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
14
|
-
submatches: the context, function name, and alias.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
13
|
+
'eval code', and 'Global code'.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l448">code »</a><span class="member"><a name="webdriver.stacktrace.CHAKRA_STACK_FRAME_REGEXP_">webdriver.stacktrace.CHAKRA_STACK_FRAME_REGEXP_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code></span></div><p>Regular expression for parsing on stack frame in Chakra (IE).</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l477">code »</a><span class="member"><a name="webdriver.stacktrace.CLOSURE_FUNCTION_CALL_PATTERN_">webdriver.stacktrace.CLOSURE_FUNCTION_CALL_PATTERN_</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>Pattern for a function call in a Closure stack trace. Creates three optional
|
|
14
|
+
submatches: the context, function name, and alias.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l489">code »</a><span class="member"><a name="webdriver.stacktrace.CLOSURE_STACK_FRAME_REGEXP_">webdriver.stacktrace.CLOSURE_STACK_FRAME_REGEXP_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code></span></div><p>Regular expression for parsing a stack frame generated by Closure's
|
|
15
15
|
<code class="type"><a href="namespace_goog_testing_stacktrace.html">goog.testing.stacktrace</a></code>.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l266">code »</a><span class="member"><a name="webdriver.stacktrace.CONTEXT_PATTERN_">webdriver.stacktrace.CONTEXT_PATTERN_</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>Pattern for a matching the type on a fully-qualified name. Forms an
|
|
16
16
|
optional sub-match on the type. For example, in "foo.bar.baz", will match on
|
|
17
|
-
"foo.bar".</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
18
|
-
Creates a submatch for the function name.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
17
|
+
"foo.bar".</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l380">code »</a><span class="member"><a name="webdriver.stacktrace.FIREFOX_FUNCTION_CALL_PATTERN_">webdriver.stacktrace.FIREFOX_FUNCTION_CALL_PATTERN_</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>RegExp pattern for function call in the Firefox stack trace.
|
|
18
|
+
Creates a submatch for the function name.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l370">code »</a><span class="member"><a name="webdriver.stacktrace.FIREFOX_FUNCTION_NAME_PATTERN_">webdriver.stacktrace.FIREFOX_FUNCTION_NAME_PATTERN_</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>RegExp pattern for function names in the Firefox stack trace.
|
|
19
19
|
Firefox has extended identifiers to deal with inner functions and anonymous
|
|
20
|
-
functions: https://bugzilla.mozilla.org/show_bug.cgi?id=433529#c9</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
20
|
+
functions: https://bugzilla.mozilla.org/show_bug.cgi?id=433529#c9</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l390">code »</a><span class="member"><a name="webdriver.stacktrace.FIREFOX_STACK_FRAME_REGEXP_">webdriver.stacktrace.FIREFOX_STACK_FRAME_REGEXP_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code></span></div><p>Regular expression for parsing one stack frame in Firefox.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l256">code »</a><span class="member"><a name="webdriver.stacktrace.IDENTIFIER_PATTERN_">webdriver.stacktrace.IDENTIFIER_PATTERN_</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>RegExp pattern for JavaScript identifiers. We don't support Unicode
|
|
21
21
|
identifiers defined in ECMAScript v3.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l247">code »</a><span class="member"><a name="webdriver.stacktrace.MAX_FIREFOX_FRAMESTRING_LENGTH_">webdriver.stacktrace.MAX_FIREFOX_FRAMESTRING_LENGTH_</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>Maximum length of a string that can be matched with a RegExp on
|
|
22
22
|
Firefox 3x. Exceeding this approximate length will cause string.match
|
|
23
23
|
to exceed Firefox's stack quota. This situation can be encountered
|
|
24
24
|
when goog.globalEval is invoked with a long argument; such as
|
|
25
|
-
when loading a module.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
26
|
-
Creates 2 (optional) submatches: the context object and function name.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
25
|
+
when loading a module.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l401">code »</a><span class="member"><a name="webdriver.stacktrace.OPERA_ANONYMOUS_FUNCTION_NAME_PATTERN_">webdriver.stacktrace.OPERA_ANONYMOUS_FUNCTION_NAME_PATTERN_</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>RegExp pattern for an anonymous function call in an Opera stack frame.
|
|
26
|
+
Creates 2 (optional) submatches: the context object and function name.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l413">code »</a><span class="member"><a name="webdriver.stacktrace.OPERA_FUNCTION_CALL_PATTERN_">webdriver.stacktrace.OPERA_FUNCTION_CALL_PATTERN_</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>RegExp pattern for a function call in an Opera stack frame.
|
|
27
27
|
Creates 3 (optional) submatches: the function name (if not anonymous),
|
|
28
|
-
the aliased context object and the function name (if anonymous).</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
28
|
+
the aliased context object and the function name (if anonymous).</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l424">code »</a><span class="member"><a name="webdriver.stacktrace.OPERA_STACK_FRAME_REGEXP_">webdriver.stacktrace.OPERA_STACK_FRAME_REGEXP_</a> : <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code></span></div><p>Regular expression for parsing on stack frame in Opera 11.68+</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l278">code »</a><span class="member"><a name="webdriver.stacktrace.QUALIFIED_NAME_PATTERN_">webdriver.stacktrace.QUALIFIED_NAME_PATTERN_</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>Pattern for matching a fully qualified name. Will create two sub-matches:
|
|
29
29
|
the type (optional), and the name. For example, in "foo.bar.baz", will
|
|
30
|
-
match on ["foo.bar", "baz"].</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#
|
|
30
|
+
match on ["foo.bar", "baz"].</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l459">code »</a><span class="member"><a name="webdriver.stacktrace.UNKNOWN_CLOSURE_FRAME_">webdriver.stacktrace.UNKNOWN_CLOSURE_FRAME_</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>Placeholder for an unparsable frame in a stack trace generated by
|
|
31
31
|
<code class="type"><a href="namespace_goog_testing_stacktrace.html">goog.testing.stacktrace</a></code>.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l335">code »</a><span class="member"><a name="webdriver.stacktrace.URL_PATTERN_">webdriver.stacktrace.URL_PATTERN_</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>RegExp pattern for an URL + position inside the file.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l288">code »</a><span class="member"><a name="webdriver.stacktrace.V8_ALIAS_PATTERN_">webdriver.stacktrace.V8_ALIAS_PATTERN_</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>RegExp pattern for function name alias in the V8 stack trace.</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/stacktrace.js.src.html#l310">code »</a><span class="member"><a name="webdriver.stacktrace.V8_CONTEXT_PATTERN_">webdriver.stacktrace.V8_CONTEXT_PATTERN_</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>RegExp pattern for the context of a function call in V8. Creates two
|
|
32
32
|
submatches, only one of which will ever match: either the namespace
|
|
33
33
|
identifier (with optional "new" keyword in the case of a constructor call),
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.until</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace webdriver.until</h1><a class="source" href="source/lib/webdriver/until.js.src.html#l41">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a><dd>Defines a condition to</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="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l101">code »</a><span class="member"><a name="webdriver.until.ableToSwitchToFrame">webdriver.until.ableToSwitchToFrame</a> <span class="args">( frame )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait until the input driver is able to switch
|
|
2
|
+
to the designated frame. The target frame may be specified as:
|
|
3
|
+
<ol>
|
|
4
|
+
<li>A numeric index into <code >window.frames</code> for the currently selected
|
|
5
|
+
frame.
|
|
6
|
+
<li>A <code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code>, which must reference a FRAME or IFRAME
|
|
7
|
+
element on the current page.
|
|
8
|
+
<li>A locator which may be used to first locate a FRAME or IFRAME on the
|
|
9
|
+
current page before attempting to switch to it.
|
|
10
|
+
</ol>
|
|
11
|
+
|
|
12
|
+
<p>Upon successful resolution of this condition, the driver will be left
|
|
13
|
+
focused on the new frame.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>frame: <code class="type">!(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>|<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>|<a href="class_webdriver_Locator.html">webdriver.Locator</a>|<a href="namespace_webdriver_By.html#webdriver.By.Hash">webdriver.By.Hash</a>|function(!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a>): !<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>)</code><dd>The frame identifier.</dl><tr><th>Returns<tr><td><dl>A new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l137">code »</a><span class="member"><a name="webdriver.until.alertIsPresent">webdriver.until.alertIsPresent</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a></code></span></div><p>Creates a condition that waits for an alert to be opened. Upon success, the
|
|
14
|
+
returned promise will be fulfilled with the handle for the opened alert.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l315">code »</a><span class="member"><a name="webdriver.until.elementIsDisabled">webdriver.until.elementIsDisabled</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to be disabled.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l301">code »</a><span class="member"><a name="webdriver.until.elementIsEnabled">webdriver.until.elementIsEnabled</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to be enabled.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l344">code »</a><span class="member"><a name="webdriver.until.elementIsNotSelected">webdriver.until.elementIsNotSelected</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to be deselected.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l285">code »</a><span class="member"><a name="webdriver.until.elementIsNotVisible">webdriver.until.elementIsNotVisible</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to be in the DOM,
|
|
15
|
+
yet not visible to the user.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l330">code »</a><span class="member"><a name="webdriver.until.elementIsSelected">webdriver.until.elementIsSelected</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to be selected.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l270">code »</a><span class="member"><a name="webdriver.until.elementIsVisible">webdriver.until.elementIsVisible</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to become visible.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l209">code »</a><span class="member"><a name="webdriver.until.elementLocated">webdriver.until.elementLocated</a> <span class="args">( locator )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a></code></span></div><p>Creates a condition that will loop until an element is
|
|
16
|
+
<code class="type"><a href="class_webdriver_WebDriver.html#findElement">found</a></code> with the given locator.</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 locator
|
|
17
|
+
to use.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l382">code »</a><span class="member"><a name="webdriver.until.elementTextContains">webdriver.until.elementTextContains</a> <span class="args">( element, substr )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element's
|
|
18
|
+
<code class="type"><a class="unresolved-link">visible text</a></code> to contain the given
|
|
19
|
+
substring.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.<dt>substr: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The substring to search for.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l363">code »</a><span class="member"><a name="webdriver.until.elementTextIs">webdriver.until.elementTextIs</a> <span class="args">( element, text )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element's
|
|
20
|
+
<code class="type"><a class="unresolved-link">visible text</a></code> to match the given
|
|
21
|
+
<code >text</code> exactly.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.<dt>text: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The expected text.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l401">code »</a><span class="member"><a name="webdriver.until.elementTextMatches">webdriver.until.elementTextMatches</a> <span class="args">( element, regex )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element's
|
|
22
|
+
<code class="type"><a class="unresolved-link">visible text</a></code> to match a regular
|
|
23
|
+
expression.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element to test.<dt>regex: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code><dd>The regular expression to test against.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l229">code »</a><span class="member"><a name="webdriver.until.elementsLocated">webdriver.until.elementsLocated</a> <span class="args">( locator )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a></code></span></div><p>Creates a condition that will loop until at least one element is
|
|
24
|
+
<code class="type"><a href="class_webdriver_WebDriver.html#findElement">found</a></code> with the given locator.</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 locator
|
|
25
|
+
to use.</dl><tr><th>Returns<tr><td><dl>The new
|
|
26
|
+
condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l249">code »</a><span class="member"><a name="webdriver.until.stalenessOf">webdriver.until.stalenessOf</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the given element to become stale. An
|
|
27
|
+
element is considered stale once it is removed from the DOM, or a new page
|
|
28
|
+
has loaded.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code><dd>The element that should become stale.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l174">code »</a><span class="member"><a name="webdriver.until.titleContains">webdriver.until.titleContains</a> <span class="args">( substr )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the current page's title to contain
|
|
29
|
+
the given substring.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>substr: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The substring that should be present in the page
|
|
30
|
+
title.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l155">code »</a><span class="member"><a name="webdriver.until.titleIs">webdriver.until.titleIs</a> <span class="args">( title )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the current page's title to match the
|
|
31
|
+
given value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>title: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The expected page title.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/until.js.src.html#l192">code »</a><span class="member"><a name="webdriver.until.titleMatches">webdriver.until.titleMatches</a> <span class="args">( regex )</span> ⇒ <code class="type">!<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>></code></span></div><p>Creates a condition that will wait for the current page's title to match the
|
|
32
|
+
given regular expression.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>regex: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code><dd>The regular expression to test against.</dl><tr><th>Returns<tr><td><dl>The new condition.</dl></table></div></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>
|