selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
16 lines • 9.55 kB
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#l963">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="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#l982">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></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
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 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#l1032">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></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 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#l1047">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></code></span></div><p>Schedules a command to delete the cookie with the given name. This command is
a no-op if there is no cookie with the given name visible to the current
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 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#l1079">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
if there is no such cookie. The cookie will be returned as a JSON object as
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 promise that will be resolved with the
named cookie, or <code >null</code> 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#l1063">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.
Each cookie will be returned as a JSON object as described by the WebDriver
wire protocol.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be 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#l1092">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
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#l1101">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
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#l1110">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
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#l966">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>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</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>