class WebDriver.Options
Provides methods for managing browser and driver state.
new WebDriver.Options(driver)
- driver
webdriver.WebDriver
The parent driver.
Instance Methods
addCookie(name, value, opt_path, opt_domain, opt_isSecure, opt_expiry)code »
Schedules a command to add a cookie.
- name
string
The cookie name.
- value
string
The cookie value.
- opt_path
string=
The cookie path.
- opt_domain
string=
The cookie domain.
- opt_isSecure
boolean=
Whether the cookie is secure.
- opt_expiry
(number|Date)=
When the cookie expires. If specified as a number, should be in milliseconds since midnight, January 1, 1970 UTC.
webdriver.promise.Promise<undefined>
A promise that will be resolved when the cookie has been added to the page.
deleteAllCookies()code »
Schedules a command to delete all cookies visible to the current page.
webdriver.promise.Promise<undefined>
A promise that will be resolved when all cookies have been deleted.
deleteCookie(name)code »
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.
- name
string
The name of the cookie to delete.
webdriver.promise.Promise<undefined>
A promise that will be resolved when the cookie has been deleted.
getCookies()code »
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.
logs()code »
webdriver.WebDriver.Logs
The interface for managing driver logs.
timeouts()code »
webdriver.WebDriver.Timeouts
The interface for managing driver timeouts.
window()code »
webdriver.WebDriver.Window
The interface for managing the current window.