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,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver</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.WebDriver</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver</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.WebDriver</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l77">code »</a></header><section><p>Creates a new WebDriver client, which provides control over a browser.
|
|
2
2
|
|
|
3
3
|
Every WebDriver command returns a <code >webdriver.promise.Promise</code> that
|
|
4
4
|
represents the result of that command. Callbacks may be registered on this
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</code></pre><h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebDriver <span class="args">( session, executor, opt_flow )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>session: <code class="type">!(<a href="class_webdriver_Session.html">webdriver.Session</a>|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>)</code><dd>Either a
|
|
18
18
|
known session or a promise that will be resolved to a session.<dt>executor: <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a></code><dd>The executor to use when
|
|
19
19
|
sending commands to the browser.<dt>opt_flow: <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a>=</code><dd>The flow to
|
|
20
|
-
schedule commands through. Defaults to the active flow object.</dl></table></div></div></div></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_WebDriver_Logs.html">webdriver.WebDriver.Logs</a><dd>Interface for managing WebDriver log records.<dt><a href="class_webdriver_WebDriver_Navigation.html">webdriver.WebDriver.Navigation</a><dd>Interface for navigating back and forth in the browser history.<dt><a href="class_webdriver_WebDriver_Options.html">webdriver.WebDriver.Options</a><dd>Provides methods for managing browser and driver state.<dt><a href="class_webdriver_WebDriver_TargetLocator.html">webdriver.WebDriver.TargetLocator</a><dd>An interface for changing the focus of the driver to another frame or window.<dt><a href="class_webdriver_WebDriver_Timeouts.html">webdriver.WebDriver.Timeouts</a><dd>An interface for managing timeout behavior for WebDriver instances.<dt><a href="class_webdriver_WebDriver_Window.html">webdriver.WebDriver.Window</a><dd>An interface for managing the current window.</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="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
20
|
+
schedule commands through. Defaults to the active flow object.</dl></table></div></div></div></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_webdriver_WebDriver_Logs.html">webdriver.WebDriver.Logs</a><dd>Interface for managing WebDriver log records.<dt><a href="class_webdriver_WebDriver_Navigation.html">webdriver.WebDriver.Navigation</a><dd>Interface for navigating back and forth in the browser history.<dt><a href="class_webdriver_WebDriver_Options.html">webdriver.WebDriver.Options</a><dd>Provides methods for managing browser and driver state.<dt><a href="class_webdriver_WebDriver_TargetLocator.html">webdriver.WebDriver.TargetLocator</a><dd>An interface for changing the focus of the driver to another frame or window.<dt><a href="class_webdriver_WebDriver_Timeouts.html">webdriver.WebDriver.Timeouts</a><dd>An interface for managing timeout behavior for WebDriver instances.<dt><a href="class_webdriver_WebDriver_Window.html">webdriver.WebDriver.Window</a><dd>An interface for managing the current window.</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="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l442">code »</a><span class="member"><a name="actions">actions</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_ActionSequence.html">webdriver.ActionSequence</a></code></span></div><p>Creates a new action sequence using this driver. The sequence will not be
|
|
21
21
|
scheduled for execution until <code class="type"><a href="class_webdriver_ActionSequence.html#perform">webdriver.ActionSequence#perform</a></code> is
|
|
22
22
|
called. Example:
|
|
23
23
|
<pre><code>
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
mouseMove(element2).
|
|
27
27
|
mouseUp().
|
|
28
28
|
perform();
|
|
29
|
-
</code></pre></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A new action sequence 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#
|
|
29
|
+
</code></pre></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A new action sequence 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#l600">code »</a><code class="type"><T></code> <span class="member"><a name="call">call</a> <span class="args">( fn, opt_scope, var_args )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Schedules a command to execute a custom function.</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>.<T>)</code><dd>The function to
|
|
30
30
|
execute.<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 execute the function.<dt>var_args: <code class="type">...*</code><dd>Any arguments to pass to the function.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved'
|
|
31
|
-
with the function's 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#
|
|
32
|
-
when this 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#
|
|
33
|
-
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#
|
|
31
|
+
with the function's 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#l710">code »</a><span class="member"><a name="close">close</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to close the current window.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
32
|
+
when this 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#l307">code »</a><span class="member"><a name="controlFlow">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 control flow used by this
|
|
33
|
+
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#l578">code »</a><code class="type"><T></code> <span class="member"><a name="executeAsyncScript">executeAsyncScript</a> <span class="args">( script, var_args )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Schedules a command to execute asynchronous JavaScript in the context of the
|
|
34
34
|
currently selected frame or window. The script fragment will be executed as
|
|
35
35
|
the body of an anonymous function. If the script is provided as a function
|
|
36
36
|
object, that function will be converted to a string for injection into the
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
console.log(JSON.parse(str)['food']);
|
|
103
103
|
});
|
|
104
104
|
</pre></code></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>script: <code class="type">!(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The script to execute.<dt>var_args: <code class="type">...*</code><dd>The arguments to pass to the script.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve to the
|
|
105
|
-
scripts return 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#
|
|
105
|
+
scripts return 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#l485">code »</a><code class="type"><T></code> <span class="member"><a name="executeScript">executeScript</a> <span class="args">( script, var_args )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Schedules a command to execute JavaScript in the context of the currently
|
|
106
106
|
selected frame or window. The script fragment will be executed as the body
|
|
107
107
|
of an anonymous function. If the script is provided as a function object,
|
|
108
108
|
that function will be converted to a string for injection into the target
|
|
@@ -132,14 +132,14 @@
|
|
|
132
132
|
<li>For arrays and objects, each member item will be converted according to
|
|
133
133
|
the rules above</li>
|
|
134
134
|
</ul></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>script: <code class="type">!(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The script to execute.<dt>var_args: <code class="type">...*</code><dd>The arguments to pass to the script.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve to the
|
|
135
|
-
scripts return 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/webdriver.js.src.html#
|
|
135
|
+
scripts return 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/webdriver.js.src.html#l862">code »</a><span class="member"><a name="findDomElement_">findDomElement_</a> <span class="args">( element )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>></code></span></div><p>Locates a DOM element so that commands may be issued against it using the
|
|
136
136
|
<code class="type"><a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code> class. This is accomplished by storing a
|
|
137
137
|
reference to the element in an object on the element's ownerDocument.
|
|
138
138
|
<code class="type"><a class="unresolved-link">#executeScript</a></code> will then be used to create a WebElement from this
|
|
139
139
|
reference. This requires this driver to currently be focused on the
|
|
140
140
|
ownerDocument's window+frame.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to locate.</dl><tr><th>Returns<tr><td><dl>A promise that
|
|
141
141
|
will be fulfilled with the located element, or null if the element
|
|
142
|
-
could not be found.</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#
|
|
142
|
+
could not be found.</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#l799">code »</a><span class="member"><a name="findElement">findElement</a> <span class="args">( locator )</span> ⇒ <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></span></div><p>Schedule a command to find an element on the page. If the element cannot be
|
|
143
143
|
found, a <code class="type"><a href="enum_bot_ErrorCode.html#bot.ErrorCode.NO_SUCH_ELEMENT">bot.ErrorCode.NO_SUCH_ELEMENT</a></code> result will be returned
|
|
144
144
|
by the driver. Unlike other commands, this error cannot be suppressed. In
|
|
145
145
|
other words, scheduling a command to find an element doubles as an assert
|
|
@@ -182,39 +182,39 @@
|
|
|
182
182
|
<code class="type"><a href="enum_bot_ErrorCode.html#bot.ErrorCode.NO_SUCH_ELEMENT">bot.ErrorCode.NO_SUCH_ELEMENT</a></code> error will be returned.</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="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The
|
|
183
183
|
locator to use.</dl><tr><th>Returns<tr><td><dl>A WebElement that can be used to issue
|
|
184
184
|
commands against the located element. If the element is not found, the
|
|
185
|
-
element will be invalidated and all scheduled commands aborted.</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#
|
|
185
|
+
element will be invalidated and all scheduled commands aborted.</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#l834">code »</a><span class="member"><a name="findElementInternal_">findElementInternal_</a> <span class="args">( locatorFn, context )</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>locatorFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The locator function to use.<dt>context: <code class="type">!(<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a>|<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>)</code><dd>The search
|
|
186
186
|
context.</dl><tr><th>Returns<tr><td><dl>A
|
|
187
|
-
promise that will resolve to a list 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#
|
|
187
|
+
promise that will resolve to a list 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#l926">code »</a><span class="member"><a name="findElements">findElements</a> <span class="args">( locator )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedule a command to search for multiple elements on the page.</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
|
|
188
188
|
strategy to use when searching for the element.</dl><tr><th>Returns<tr><td><dl>A
|
|
189
|
-
promise that will resolve to an array of WebElements.</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#
|
|
189
|
+
promise that will resolve to an array of WebElements.</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#l947">code »</a><span class="member"><a name="findElementsInternal_">findElementsInternal_</a> <span class="args">( locatorFn, context )</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>locatorFn: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The locator function to use.<dt>context: <code class="type">!(<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a>|<a href="class_webdriver_WebElement.html">webdriver.WebElement</a>)</code><dd>The search
|
|
190
190
|
context.</dl><tr><th>Returns<tr><td><dl>A
|
|
191
|
-
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#
|
|
192
|
-
when the document has finished loading.</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#
|
|
193
|
-
be resolved with an array of window handles.</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#
|
|
194
|
-
that will resolve with the this instance's capabilities.</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#
|
|
195
|
-
resolved with the current URL.</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#
|
|
191
|
+
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#l722">code »</a><span class="member"><a name="get">get</a> <span class="args">( url )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to navigate to the given URL.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>url: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The fully qualified URL to open.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
192
|
+
when the document has finished loading.</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#l683">code »</a><span class="member"><a name="getAllWindowHandles">getAllWindowHandles</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to retrieve the current list of available window handles.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will
|
|
193
|
+
be resolved with an array of window handles.</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#l403">code »</a><span class="member"><a name="getCapabilities">getCapabilities</a> <span class="args">( )</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>Returns<tr><td><dl>A promise
|
|
194
|
+
that will resolve with the this instance's capabilities.</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#l732">code »</a><span class="member"><a name="getCurrentUrl">getCurrentUrl</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>Schedules a command to retrieve the URL of the current page.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
195
|
+
resolved with the current URL.</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#l698">code »</a><span class="member"><a name="getPageSource">getPageSource</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>Schedules a command to retrieve the current page's source. The page source
|
|
196
196
|
returned is a representation of the underlying DOM: do not expect it to be
|
|
197
197
|
formatted or escaped in the same way as the response sent from the web
|
|
198
198
|
server.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
199
|
-
resolved with the current page source.</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#
|
|
200
|
-
client's session.</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#
|
|
201
|
-
resolved with the current page's title.</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#
|
|
202
|
-
resolved with the current window handle.</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#
|
|
199
|
+
resolved with the current page source.</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#l394">code »</a><span class="member"><a name="getSession">getSession</a> <span class="args">( )</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>Returns<tr><td><dl>A promise for this
|
|
200
|
+
client's session.</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#l744">code »</a><span class="member"><a name="getTitle">getTitle</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>Schedules a command to retrieve the current page's title.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
201
|
+
resolved with the current page's title.</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#l671">code »</a><span class="member"><a name="getWindowHandle">getWindowHandle</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>Schedules a command to retrieve they current window handle.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
202
|
+
resolved with the current window handle.</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#l906">code »</a><span class="member"><a name="isElementPresent">isElementPresent</a> <span class="args">( locatorOrElement )</span> ⇒ <code class="type">!<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></span></div><p>Schedules a command to test if an element is present on the page.
|
|
203
203
|
|
|
204
204
|
<p>If given a DOM element, this function will check if it belongs to the
|
|
205
205
|
document the driver is currently focused on. Otherwise, the function will
|
|
206
206
|
test if at least one element can be found with the given search criteria.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>locatorOrElement: <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="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>)</code><dd>The locator to use, or the actual
|
|
207
207
|
DOM element to be located by the server.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve
|
|
208
|
-
with whether the element is present 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#
|
|
209
|
-
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#
|
|
210
|
-
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#
|
|
208
|
+
with whether the element is present 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#l988">code »</a><span class="member"><a name="manage">manage</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_Options.html">webdriver.WebDriver.Options</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The options interface for this
|
|
209
|
+
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#l997">code »</a><span class="member"><a name="navigate">navigate</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_Navigation.html">webdriver.WebDriver.Navigation</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The navigation interface for this
|
|
210
|
+
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#l417">code »</a><span class="member"><a name="quit">quit</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to quit the current session. After calling quit, this
|
|
211
211
|
instance will be invalidated and may no longer be used to issue commands
|
|
212
212
|
against the browser.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
213
|
-
when the 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#
|
|
213
|
+
when the 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#l321">code »</a><code class="type"><T></code> <span class="member"><a name="schedule">schedule</a> <span class="args">( command, description )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Schedules a <code >webdriver.Command</code> to be executed by this driver's
|
|
214
214
|
<code >webdriver.CommandExecutor</code>.</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
|
|
215
|
-
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#
|
|
216
|
-
when the sleep has finished.</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#
|
|
217
|
-
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#
|
|
215
|
+
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#l661">code »</a><span class="member"><a name="sleep">sleep</a> <span class="args">( ms )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to make the driver sleep for the given amount of time.</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 sleep.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
216
|
+
when the sleep has finished.</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#l1006">code »</a><span class="member"><a name="switchTo">switchTo</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_TargetLocator.html">webdriver.WebDriver.TargetLocator</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The target locator interface for
|
|
217
|
+
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#l978">code »</a><span class="member"><a name="takeScreenshot">takeScreenshot</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code></span></div><p>Schedule a command to take a screenshot. The driver makes a best effort to
|
|
218
218
|
return a screenshot of the following, in order of preference:
|
|
219
219
|
<ol>
|
|
220
220
|
<li>Entire page
|
|
@@ -222,37 +222,39 @@
|
|
|
222
222
|
<li>Visible portion of the current frame
|
|
223
223
|
<li>The screenshot of the entire display containing the browser
|
|
224
224
|
</ol></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
225
|
-
resolved to the screenshot as a base-64 encoded PNG.</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#
|
|
225
|
+
resolved to the screenshot as a base-64 encoded PNG.</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#l636">code »</a><code class="type"><T></code> <span class="member"><a name="wait">wait</a> <span class="args">( condition, timeout, opt_message )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<T></code></span></div><p>Schedules a command to wait for a condition to hold, as defined by some
|
|
226
226
|
user supplied function. If any errors occur while evaluating the wait, they
|
|
227
227
|
will be allowed to propagate.
|
|
228
228
|
|
|
229
229
|
<p>In the event a condition returns a <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code>, the
|
|
230
230
|
polling loop will wait for it to be resolved and use the resolved value for
|
|
231
231
|
evaluating whether the condition has been satisfied. The resolution time for
|
|
232
|
-
a promise is factored into whether a wait has timed out.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
a promise is factored into whether a wait has timed out.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>condition: <code class="type">!(<a href="class_webdriver_until_Condition.html">webdriver.until.Condition</a>.<T>|function(!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a>): T)</code><dd>Either a condition
|
|
233
|
+
object, or a function to evaluate as a condition.<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 for the condition to be true.<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 message to use if the wait times
|
|
234
|
+
out.</dl><tr><th>Returns<tr><td><dl>A promise that will be fulfilled
|
|
235
|
+
with the first truthy value returned by the condition function, or
|
|
236
|
+
rejected if the condition times out.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l83">code »</a><span class="member"><a name="executor_">executor_</a> : <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</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#l86">code »</a><span class="member"><a name="flow_">flow_</a> : <code class="type">!<a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</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#l80">code »</a><span class="member"><a name="session_">session_</a> : <code class="type">!(<a href="class_webdriver_Session.html">webdriver.Session</a>|<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>)</code></span></div></summary></details></div></div></section><section id="static-functions"><h2>Static Functions</h2><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l146">code »</a><span class="member"><a name="webdriver.WebDriver.acquireSession_">webdriver.WebDriver.acquireSession_</a> <span class="args">( executor, command, description, opt_flow )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div><p>Sends a command to the server that is expected to return the details for a
|
|
235
237
|
<code class="type"><a href="class_webdriver_Session.html">webdriver.Session</a></code>. This may either be an existing session, or a
|
|
236
238
|
newly created one.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>executor: <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a></code><dd>Command executor to use when
|
|
237
239
|
querying for session details.<dt>command: <code class="type">!<a href="class_webdriver_Command.html">webdriver.Command</a></code><dd>The command to send to fetch the session
|
|
238
240
|
details.<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 descriptive debug label for this action.<dt>opt_flow: <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a>=</code><dd>The control flow all driver
|
|
239
241
|
commands should execute under. Defaults to the
|
|
240
|
-
<code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.controlFlow">currently active</a></code> control flow.</dl><tr><th>Returns<tr><td><dl>A new WebDriver client for the session.</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#
|
|
242
|
+
<code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.controlFlow">currently active</a></code> control flow.</dl><tr><th>Returns<tr><td><dl>A new WebDriver client for the session.</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#l100">code »</a><span class="member"><a name="webdriver.WebDriver.attachToSession">webdriver.WebDriver.attachToSession</a> <span class="args">( executor, sessionId, opt_flow )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div><p>Creates a new WebDriver client for an existing session.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>executor: <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a></code><dd>Command executor to use when
|
|
241
243
|
querying for session details.<dt>sessionId: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>ID of the session to attach to.<dt>opt_flow: <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a>=</code><dd>The control flow all driver
|
|
242
244
|
commands should execute under. Defaults to the
|
|
243
|
-
<code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.controlFlow">currently active</a></code> control flow.</dl><tr><th>Returns<tr><td><dl>A new client for the specified session.</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#
|
|
245
|
+
<code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.controlFlow">currently active</a></code> control flow.</dl><tr><th>Returns<tr><td><dl>A new client for the specified session.</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#l121">code »</a><span class="member"><a name="webdriver.WebDriver.createSession">webdriver.WebDriver.createSession</a> <span class="args">( executor, desiredCapabilities, opt_flow )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div><p>Creates a new WebDriver session.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>executor: <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a></code><dd>The executor to create the new
|
|
244
246
|
session with.<dt>desiredCapabilities: <code class="type">!<a href="class_webdriver_Capabilities.html">webdriver.Capabilities</a></code><dd>The desired
|
|
245
247
|
capabilities for the new session.<dt>opt_flow: <code class="type"><a href="class_webdriver_promise_ControlFlow.html">webdriver.promise.ControlFlow</a>=</code><dd>The control flow all driver
|
|
246
248
|
commands should execute under, including the initial session creation.
|
|
247
249
|
Defaults to the <code class="type"><a href="namespace_webdriver_promise.html#webdriver.promise.controlFlow">currently active</a></code>
|
|
248
|
-
control flow.</dl><tr><th>Returns<tr><td><dl>The driver for the newly created session.</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#
|
|
250
|
+
control flow.</dl><tr><th>Returns<tr><td><dl>The driver for the newly created session.</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#l293">code »</a><span class="member"><a name="webdriver.WebDriver.executeCommand_">webdriver.WebDriver.executeCommand_</a> <span class="args">( executor, command )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Translates a command to its wire-protocol representation before passing it
|
|
249
251
|
to the given <code >executor</code> for execution.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>executor: <code class="type">!<a href="interface_webdriver_CommandExecutor.html">webdriver.CommandExecutor</a></code><dd>The executor to use.<dt>command: <code class="type">!<a href="class_webdriver_Command.html">webdriver.Command</a></code><dd>The command to execute.</dl><tr><th>Returns<tr><td><dl>A promise that will resolve with the
|
|
250
|
-
command response.</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#
|
|
252
|
+
command response.</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#l268">code »</a><span class="member"><a name="webdriver.WebDriver.fromWireValue_">webdriver.WebDriver.fromWireValue_</a> <span class="args">( driver, value )</span> ⇒ <code class="type">*</code></span></div><p>Converts a value from its JSON representation according to the WebDriver wire
|
|
251
253
|
protocol. Any JSON object containing a
|
|
252
254
|
<code >webdriver.WebElement.ELEMENT_KEY</code> key will be decoded to a
|
|
253
255
|
<code >webdriver.WebElement</code> object. All other values will be passed through
|
|
254
256
|
as is.</summary><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 driver instance to use as the
|
|
255
|
-
parent of any unwrapped <code >webdriver.WebElement</code> values.<dt>value: <code class="type">*</code><dd>The value to convert.</dl><tr><th>Returns<tr><td><dl>The converted 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/webdriver.js.src.html#
|
|
257
|
+
parent of any unwrapped <code >webdriver.WebElement</code> values.<dt>value: <code class="type">*</code><dd>The value to convert.</dl><tr><th>Returns<tr><td><dl>The converted 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/webdriver.js.src.html#l179">code »</a><span class="member"><a name="webdriver.WebDriver.toWireValue_">webdriver.WebDriver.toWireValue_</a> <span class="args">( obj )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Converts an object to its JSON representation in the WebDriver wire protocol.
|
|
256
258
|
When converting values of type object, the following steps will be taken:
|
|
257
259
|
<ol>
|
|
258
260
|
<li>if the object is a WebElement, the return value will be the element's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Logs</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.WebDriver.Logs</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Logs</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.WebDriver.Logs</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1420">code »</a></header><section><p>Interface for managing WebDriver log records.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebDriver.Logs <span class="args">( driver )</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 driver.</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><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1441">code »</a><span class="member"><a name="get">get</a> <span class="args">( type )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Fetches available log entries for the given type.
|
|
2
2
|
|
|
3
3
|
<p/>Note that log buffers are reset after each call, meaning that
|
|
4
4
|
available log entries correspond to those entries not yet returned for a
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
available log entries since the last call, or from the start of the
|
|
7
7
|
session.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type">!<a href="enum_webdriver_logging_Type.html">webdriver.logging.Type</a></code><dd>The desired log type.</dl><tr><th>Returns<tr><td><dl>A
|
|
8
8
|
promise that will resolve to a list of log entries for the specified
|
|
9
|
-
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/webdriver.js.src.html#
|
|
10
|
-
promise that will resolve to a list of available log types.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
9
|
+
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/webdriver.js.src.html#l1464">code »</a><span class="member"><a name="getAvailableLogTypes">getAvailableLogTypes</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Retrieves the log types available to this driver.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A
|
|
10
|
+
promise that will resolve to a list of available log types.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1423">code »</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></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,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Navigation</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.WebDriver.Navigation</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
2
|
-
when the navigation event 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#
|
|
3
|
-
when the navigation event 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#
|
|
4
|
-
when the navigation event 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#
|
|
5
|
-
when the URL has been loaded.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Navigation</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.WebDriver.Navigation</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1017">code »</a></header><section><p>Interface for navigating back and forth in the browser history.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebDriver.Navigation <span class="args">( driver )</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 driver.</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><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1043">code »</a><span class="member"><a name="back">back</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to move backwards in the browser history.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
2
|
+
when the navigation event 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#l1055">code »</a><span class="member"><a name="forward">forward</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to move forwards in the browser history.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
3
|
+
when the navigation event 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#l1067">code »</a><span class="member"><a name="refresh">refresh</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to refresh the current page.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
4
|
+
when the navigation event 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#l1030">code »</a><span class="member"><a name="to">to</a> <span class="args">( url )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to navigate to a new URL.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>url: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The URL to navigate to.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
5
|
+
when the URL has been loaded.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1020">code »</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></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,17 +1,17 @@
|
|
|
1
|
-
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Options</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.WebDriver.Options</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
1
|
+
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.WebDriver.Options</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.WebDriver.Options</h1><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1080">code »</a></header><section><p>Provides methods for managing browser and driver state.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.WebDriver.Options <span class="args">( driver )</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 driver.</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="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1099">code »</a><a class="member" name="webdriver.WebDriver.Options.Cookie">webdriver.WebDriver.Options.Cookie</a> : <code class="type">{name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, path: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>), domain: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>), secure: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>), expiry: (<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/Undefined">undefined</a>)}</code></div><div>A JSON description of a browser cookie.</div></summary></details></div></div></section><section id="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1114">code »</a><span class="member"><a name="addCookie">addCookie</a> <span class="args">( name, value, opt_path, opt_domain, opt_isSecure, opt_expiry )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to add a cookie.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The cookie name.<dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The cookie value.<dt>opt_path: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The cookie path.<dt>opt_domain: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The cookie domain.<dt>opt_isSecure: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether the cookie is secure.<dt>opt_expiry: <code class="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/Date">Date</a>)=</code><dd>When the cookie expires. If specified as
|
|
2
2
|
a number, should be in milliseconds since midnight, January 1, 1970 UTC.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
3
|
-
when the cookie has been added to 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#
|
|
4
|
-
when all cookies have been deleted.</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#
|
|
3
|
+
when the cookie has been added to 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#l1164">code »</a><span class="member"><a name="deleteAllCookies">deleteAllCookies</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to delete all cookies visible to the current page.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
4
|
+
when all cookies have been deleted.</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#l1179">code »</a><span class="member"><a name="deleteCookie">deleteCookie</a> <span class="args">( name )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a>.<void></code></span></div><p>Schedules a command to delete the cookie with the given name. This command is
|
|
5
5
|
a no-op if there is no cookie with the given name visible to the current
|
|
6
6
|
page.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <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 cookie to delete.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved
|
|
7
|
-
when the cookie has been deleted.</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#
|
|
7
|
+
when the cookie has been deleted.</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#l1213">code »</a><span class="member"><a name="getCookie">getCookie</a> <span class="args">( name )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to retrieve the cookie with the given name. Returns null
|
|
8
8
|
if there is no such cookie. The cookie will be returned as a JSON object as
|
|
9
9
|
described by the WebDriver wire protocol.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <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 cookie to retrieve.</dl><tr><th>Returns<tr><td><dl>A
|
|
10
10
|
promise that will be resolved with the named cookie, or <code >null</code>
|
|
11
|
-
if there is no such cookie.</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#
|
|
11
|
+
if there is no such cookie.</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#l1196">code »</a><span class="member"><a name="getCookies">getCookies</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to retrieve all cookies visible to the current page.
|
|
12
12
|
Each cookie will be returned as a JSON object as described by the WebDriver
|
|
13
13
|
wire protocol.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be
|
|
14
|
-
resolved with the cookies visible to the current 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#
|
|
15
|
-
logs.</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#
|
|
16
|
-
timeouts.</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#
|
|
17
|
-
current window.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#
|
|
14
|
+
resolved with the cookies visible to the current 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#l1226">code »</a><span class="member"><a name="logs">logs</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_Logs.html">webdriver.WebDriver.Logs</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The interface for managing driver
|
|
15
|
+
logs.</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#l1235">code »</a><span class="member"><a name="timeouts">timeouts</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_Timeouts.html">webdriver.WebDriver.Timeouts</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The interface for managing driver
|
|
16
|
+
timeouts.</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#l1244">code »</a><span class="member"><a name="window">window</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_webdriver_WebDriver_Window.html">webdriver.WebDriver.Window</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The interface for managing the
|
|
17
|
+
current window.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/webdriver.js.src.html#l1083">code »</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></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>
|