Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/selenium-webdriver

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/selenium-webdriver - npm Package Compare versions

Comparing version 4.0.20 to 4.1.0

selenium-webdriver/lib/webdriver.d.ts

197

selenium-webdriver/lib/by.d.ts

@@ -9,103 +9,103 @@ import { Locator, WebDriver } from '../';

export class By {
/**
* @param {string} using the name of the location strategy to use.
* @param {string} value the value to search for.
*/
constructor(using: string, value: string);
/**
* @param {string} using the name of the location strategy to use.
* @param {string} value the value to search for.
*/
constructor(using: string, value: string);
using: string;
value: string;
using: string;
value: string;
/**
* Locates elements that have a specific class name.
*
* @param {string} name The class name to search for.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
* @see http://www.w3.org/TR/CSS2/selector.html#class-html
*/
static className(name: string): By;
/**
* Locates elements that have a specific class name.
*
* @param {string} name The class name to search for.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
* @see http://www.w3.org/TR/CSS2/selector.html#class-html
*/
static className(name: string): By;
/**
* Locates elements using a CSS selector.
*
* @param {string} selector The CSS selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/CSS2/selector.html
*/
static css(selector: string): By;
/**
* Locates elements using a CSS selector.
*
* @param {string} selector The CSS selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/CSS2/selector.html
*/
static css(selector: string): By;
/**
* Locates eleemnts by the ID attribute. This locator uses the CSS selector
* `*[id='$ID']`, _not_ `document.getElementById`.
*
* @param {string} id The ID to search for.
* @return {!By} The new locator.
*/
static id(id: string): By;
/**
* Locates eleemnts by the ID attribute. This locator uses the CSS selector
* `*[id='$ID']`, _not_ `document.getElementById`.
*
* @param {string} id The ID to search for.
* @return {!By} The new locator.
*/
static id(id: string): By;
/**
* Locates link elements whose
* {@linkplain WebElement#getText visible text} matches the given
* string.
*
* @param {string} text The link text to search for.
* @return {!By} The new locator.
*/
static linkText(text: string): By;
/**
* Locates link elements whose
* {@linkplain WebElement#getText visible text} matches the given
* string.
*
* @param {string} text The link text to search for.
* @return {!By} The new locator.
*/
static linkText(text: string): By;
/**
* Locates an elements by evaluating a
* {@linkplain WebDriver#executeScript JavaScript expression}.
* The result of this expression must be an element or list of elements.
*
* @param {!(string|Function)} script The script to execute.
* @param {...*} var_args The arguments to pass to the script.
* @return {function(!./WebDriver): !./Promise}
* A new JavaScript-based locator function.
*/
static js(script: string|Function, ...var_args: any[]): (webdriver: WebDriver) => Promise<any>;
/**
* Locates an elements by evaluating a
* {@linkplain WebDriver#executeScript JavaScript expression}.
* The result of this expression must be an element or list of elements.
*
* @param {!(string|Function)} script The script to execute.
* @param {...*} var_args The arguments to pass to the script.
* @return {function(!./WebDriver): !./Promise}
* A new JavaScript-based locator function.
*/
static js(script: string | Function, ...var_args: any[]): (webdriver: WebDriver) => Promise<any>;
/**
* Locates elements whose `name` attribute has the given value.
*
* @param {string} name The name attribute to search for.
* @return {!By} The new locator.
*/
static name(name: string): By;
/**
* Locates elements whose `name` attribute has the given value.
*
* @param {string} name The name attribute to search for.
* @return {!By} The new locator.
*/
static name(name: string): By;
/**
* Locates link elements whose
* {@linkplain WebElement#getText visible text} contains the given
* substring.
*
* @param {string} text The substring to check for in a link's visible text.
* @return {!By} The new locator.
*/
static partialLinkText(text: string): By;
/**
* Locates link elements whose
* {@linkplain WebElement#getText visible text} contains the given
* substring.
*
* @param {string} text The substring to check for in a link's visible text.
* @return {!By} The new locator.
*/
static partialLinkText(text: string): By;
/**
* Locates elements with a given tag name.
*
* @param {string} name The tag name to search for.
* @return {!By} The new locator.
* @deprecated Use {@link By.css() By.css(tagName)} instead.
*/
static tagName(name: string): By;
/**
* Locates elements with a given tag name.
*
* @param {string} name The tag name to search for.
* @return {!By} The new locator.
* @deprecated Use {@link By.css() By.css(tagName)} instead.
*/
static tagName(name: string): By;
/**
* Locates elements matching a XPath selector. Care should be taken when
* using an XPath selector with a {@link WebElement} as WebDriver
* will respect the context in the specified in the selector. For example,
* given the selector `//div`, WebDriver will search from the document root
* regardless of whether the locator was used with a WebElement.
*
* @param {string} xpath The XPath selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/xpath/
*/
static xpath(xpath: string): By;
/**
* Locates elements matching a XPath selector. Care should be taken when
* using an XPath selector with a {@link WebElement} as WebDriver
* will respect the context in the specified in the selector. For example,
* given the selector `//div`, WebDriver will search from the document root
* regardless of whether the locator was used with a WebElement.
*
* @param {string} xpath The XPath selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/xpath/
*/
static xpath(xpath: string): By;
/** @override */
toString(): string;
/** @override */
toString(): string;
}

@@ -135,8 +135,15 @@

*/
export type ByHash = {
className: string
} | {css: string} |
{id: string} | {js: string} | {linkText: string} | {name: string} | {partialLinkText: string} |
{tagName: string} | {xpath: string};
export type ByHash =
| {
className: string;
}
| { css: string }
| { id: string }
| { js: string }
| { linkText: string }
| { name: string }
| { partialLinkText: string }
| { tagName: string }
| { xpath: string };
export function checkedLocator(locator: Locator): By;

@@ -9,8 +9,8 @@ import Symbols from './symbols';

export interface IBrowser {
CHROME: string;
EDGE: string;
FIREFOX: string;
IE: string;
INTERNET_EXPLORER: string;
SAFARI: string;
CHROME: string;
EDGE: string;
FIREFOX: string;
IE: string;
INTERNET_EXPLORER: string;
SAFARI: string;
}

@@ -31,5 +31,5 @@

export interface IPlatform {
LINUX: string;
MAC: string;
WINDOWS: string;
LINUX: string;
MAC: string;
WINDOWS: string;
}

@@ -47,19 +47,19 @@

export interface IPageLoadStrategy {
/**
* Indicates WebDriver should not wait on the document readiness state after a
* navigation event.
*/
NONE: string;
/**
* Indicates WebDriver should not wait on the document readiness state after a
* navigation event.
*/
NONE: string;
/**
* Indicates WebDriver should wait for the document readiness state to
* become "interactive" after navigation.
*/
EAGER: string;
/**
* Indicates WebDriver should wait for the document readiness state to
* become "interactive" after navigation.
*/
EAGER: string;
/**
* Indicates WebDriver should wait for the document readiness state to
* be "complete" after navigation. This is the default page loading strategy.
*/
NORMAL: string;
/**
* Indicates WebDriver should wait for the document readiness state to
* be "complete" after navigation. This is the default page loading strategy.
*/
NORMAL: string;
}

@@ -77,18 +77,18 @@

export interface IUserPromptHandler {
/** All prompts should be silently accepted. */
ACCEPT: string;
/** All prompts should be silently dismissed. */
DISMISS: string;
/**
* All prompts should be automatically accepted, but an error should be
* returned to the next (or currently executing) WebDriver command.
*/
ACCEPT_AND_NOTIFY: string;
/**
* All prompts should be automatically dismissed, but an error should be
* returned to the next (or currently executing) WebDriver command.
*/
DISMISS_AND_NOTIFY: string;
/** All prompts should be left unhandled. */
IGNORE: string;
/** All prompts should be silently accepted. */
ACCEPT: string;
/** All prompts should be silently dismissed. */
DISMISS: string;
/**
* All prompts should be automatically accepted, but an error should be
* returned to the next (or currently executing) WebDriver command.
*/
ACCEPT_AND_NOTIFY: string;
/**
* All prompts should be automatically dismissed, but an error should be
* returned to the next (or currently executing) WebDriver command.
*/
DISMISS_AND_NOTIFY: string;
/** All prompts should be left unhandled. */
IGNORE: string;
}

@@ -103,64 +103,64 @@

export interface ICapability {
/**
* Indicates whether a WebDriver session implicitly trusts otherwise untrusted
* and self-signed TLS certificates during navigation.
*/
ACCEPT_INSECURE_TLS_CERTS: string;
/**
* Indicates whether a WebDriver session implicitly trusts otherwise untrusted
* and self-signed TLS certificates during navigation.
*/
ACCEPT_INSECURE_TLS_CERTS: string;
/**
* The browser name. Common browser names are defined in the
* {@link ./capabilities.Browser Browser} enum.
*/
BROWSER_NAME: string;
/**
* The browser name. Common browser names are defined in the
* {@link ./capabilities.Browser Browser} enum.
*/
BROWSER_NAME: string;
/** Identifies the browser version. */
BROWSER_VERSION: string;
/** Identifies the browser version. */
BROWSER_VERSION: string;
/**
* Key for the logging driver logging preferences.
*/
LOGGING_PREFS: string;
/**
* Key for the logging driver logging preferences.
*/
LOGGING_PREFS: string;
/**
* Defines the session's
* {@linkplain ./capabilities.PageLoadStrategy page loading strategy}.
*/
PAGE_LOAD_STRATEGY: string;
/**
* Defines the session's
* {@linkplain ./capabilities.PageLoadStrategy page loading strategy}.
*/
PAGE_LOAD_STRATEGY: string;
/**
* Identifies the operating system of the endpoint node. Common values
* recognized by the most WebDriver server implementations are predefined in
* the {@link ./capabilities.Platform Platform} enum.
*/
PLATFORM_NAME: string;
/**
* Identifies the operating system of the endpoint node. Common values
* recognized by the most WebDriver server implementations are predefined in
* the {@link ./capabilities.Platform Platform} enum.
*/
PLATFORM_NAME: string;
/**
* Describes the proxy configuration to use for a new WebDriver session.
*/
PROXY: string;
/**
* Describes the proxy configuration to use for a new WebDriver session.
*/
PROXY: string;
/**
* Indicates whether the remote end supports all of the window resizing and
* positioning commands:
*
* - {@linkplain ./webdriver.Window#getRect Window.getRect()}
* - {@linkplain ./webdriver.Window#setRect Window.setRect()}
* - {@linkplain ./webdriver.Window#maximize Window.maximize()}
* - {@linkplain ./webdriver.Window#minimize Window.minimize()}
* - {@linkplain ./webdriver.Window#fullscreen Window.fullscreen()}
*/
SET_WINDOW_RECT: string;
/**
* Indicates whether the remote end supports all of the window resizing and
* positioning commands:
*
* - {@linkplain ./webdriver.Window#getRect Window.getRect()}
* - {@linkplain ./webdriver.Window#setRect Window.setRect()}
* - {@linkplain ./webdriver.Window#maximize Window.maximize()}
* - {@linkplain ./webdriver.Window#minimize Window.minimize()}
* - {@linkplain ./webdriver.Window#fullscreen Window.fullscreen()}
*/
SET_WINDOW_RECT: string;
/**
* Describes the {@linkplain ./capabilities.Timeouts timeouts} imposed on
* certain session operations.
*/
TIMEOUTS: string;
/**
* Describes the {@linkplain ./capabilities.Timeouts timeouts} imposed on
* certain session operations.
*/
TIMEOUTS: string;
/**
* Defines how a WebDriver session should
* {@linkplain ./capabilities.UserPromptHandler respond} to unhandled user
* prompts.
*/
UNHANDLED_PROMPT_BEHAVIOR: string;
/**
* Defines how a WebDriver session should
* {@linkplain ./capabilities.UserPromptHandler respond} to unhandled user
* prompts.
*/
UNHANDLED_PROMPT_BEHAVIOR: string;
}

@@ -177,227 +177,227 @@

export class Capabilities {
// region Constructors
// region Constructors
/**
* @param {(Capabilities|Map<string, ?>|Object)=} other Another set of
* capabilities to initialize this instance from.
*/
constructor(other?: Capabilities|Map<string, any>|{});
/**
* @param {(Capabilities|Map<string, ?>|Object)=} other Another set of
* capabilities to initialize this instance from.
*/
constructor(other?: Capabilities | Map<string, any> | {});
// endregion
// endregion
// region Static Methods
// region Static Methods
/**
* @return {!Capabilities} A basic set of capabilities for Chrome.
*/
static chrome(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Chrome.
*/
static chrome(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Microsoft Edge.
*/
static edge(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Microsoft Edge.
*/
static edge(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Firefox.
*/
static firefox(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Firefox.
*/
static firefox(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for
* Internet Explorer.
*/
static ie(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for
* Internet Explorer.
*/
static ie(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Safari.
*/
static safari(): Capabilities;
/**
* @return {!Capabilities} A basic set of capabilities for Safari.
*/
static safari(): Capabilities;
// endregion
// endregion
// region Methods
// region Methods
/**
* @return {!Object<string, ?>} The JSON representation of this instance.
* Note, the returned object may contain nested promised values.
* @suppress {checkTypes} Suppress [] access on a struct (state inherited from
* Map).
*/
[Symbols.serialize](): {}
/**
* @return {!Object<string, ?>} The JSON representation of this instance.
* Note, the returned object may contain nested promised values.
* @suppress {checkTypes} Suppress [] access on a struct (state inherited from
* Map).
*/
[Symbols.serialize](): {};
/**
* @param {string} key The capability to return.
* @return {*} The capability with the given key, or {@code null} if it has
* not been set.
*/
get(key: string): any;
/**
* @param {string} key The capability to return.
* @return {*} The capability with the given key, or {@code null} if it has
* not been set.
*/
get(key: string): any;
/**
* @param {string} key The capability to check.
* @return {boolean} Whether the specified capability is set.
*/
has(key: string): boolean;
/**
* @param {string} key The capability to check.
* @return {boolean} Whether the specified capability is set.
*/
has(key: string): boolean;
/**
* @return {!Iterator<string>} an iterator of the keys set.
*/
keys(): IterableIterator<string>;
/**
* @return {!Iterator<string>} an iterator of the keys set.
*/
keys(): IterableIterator<string>;
/**
* Merges another set of capabilities into this instance.
* @param {!(Capabilities|Map<String, ?>|Object<string, ?>)} other The other
* set of capabilities to merge.
* @return {!Capabilities} A self reference.
*/
merge(other: Capabilities|Map<string, any>|{}): Capabilities;
/**
* Merges another set of capabilities into this instance.
* @param {!(Capabilities|Map<String, ?>|Object<string, ?>)} other The other
* set of capabilities to merge.
* @return {!Capabilities} A self reference.
*/
merge(other: Capabilities | Map<string, any> | {}): Capabilities;
/**
* Deletes an entry from this set of capabilities.
*
* @param {string} key the capability key to delete.
*/
delete(key: string): boolean;
/**
* Deletes an entry from this set of capabilities.
*
* @param {string} key the capability key to delete.
*/
delete(key: string): boolean;
/**
* @param {string} key The capability key.
* @param {*} value The capability value.
* @return {!Capabilities} A self reference.
* @throws {TypeError} If the `key` is not a string.
*/
set(key: string, value: any): Capabilities;
/**
* @param {string} key The capability key.
* @param {*} value The capability value.
* @return {!Capabilities} A self reference.
* @throws {TypeError} If the `key` is not a string.
*/
set(key: string, value: any): Capabilities;
/**
* Sets whether a WebDriver session should implicitly accept self-signed, or
* other untrusted TLS certificates on navigation.
*
* @param {boolean} accept whether to accept insecure certs.
* @return {!Capabilities} a self reference.
*/
setAcceptInsecureCerts(accept: boolean): Capabilities;
/**
* Sets whether a WebDriver session should implicitly accept self-signed, or
* other untrusted TLS certificates on navigation.
*
* @param {boolean} accept whether to accept insecure certs.
* @return {!Capabilities} a self reference.
*/
setAcceptInsecureCerts(accept: boolean): Capabilities;
/**
* @return {boolean} whether the session is configured to accept insecure
* TLS certificates.
*/
getAcceptInsecureCerts(): boolean;
/**
* @return {boolean} whether the session is configured to accept insecure
* TLS certificates.
*/
getAcceptInsecureCerts(): boolean;
/**
* Sets the name of the target browser.
*
* @param {(Browser|string)} name the browser name.
* @return {!Capabilities} a self reference.
*/
setBrowserName(name: string): Capabilities;
/**
* Sets the name of the target browser.
*
* @param {(Browser|string)} name the browser name.
* @return {!Capabilities} a self reference.
*/
setBrowserName(name: string): Capabilities;
/**
* @return {(string|undefined)} the configured browser name, or undefined if
* not set.
*/
getBrowserName(): string|undefined;
/**
* @return {(string|undefined)} the configured browser name, or undefined if
* not set.
*/
getBrowserName(): string | undefined;
/**
* Sets the desired version of the target browser.
*
* @param {string} version the desired version.
* @return {!Capabilities} a self reference.
*/
setBrowserVersion(version: string): Capabilities;
/**
* Sets the desired version of the target browser.
*
* @param {string} version the desired version.
* @return {!Capabilities} a self reference.
*/
setBrowserVersion(version: string): Capabilities;
/**
* @return {(string|undefined)} the configured browser version, or undefined
* if not set.
*/
getBrowserVersion(): string|undefined;
/**
* @return {(string|undefined)} the configured browser version, or undefined
* if not set.
*/
getBrowserVersion(): string | undefined;
/**
* Sets the desired page loading strategy for a new WebDriver session.
*
* @param {PageLoadStrategy} strategy the desired strategy.
* @return {!Capabilities} a self reference.
*/
setPageLoadStrategy(strategy: string): Capabilities;
/**
* Sets the desired page loading strategy for a new WebDriver session.
*
* @param {PageLoadStrategy} strategy the desired strategy.
* @return {!Capabilities} a self reference.
*/
setPageLoadStrategy(strategy: string): Capabilities;
/**
* Returns the configured page load strategy.
*
* @return {(string|undefined)} the page load strategy.
*/
getPageLoadStrategy(): string|undefined;
/**
* Returns the configured page load strategy.
*
* @return {(string|undefined)} the page load strategy.
*/
getPageLoadStrategy(): string | undefined;
/**
* Sets the target platform.
*
* @param {(Platform|string)} platform the target platform.
* @return {!Capabilities} a self reference.
*/
setPlatform(platform: string): Capabilities;
/**
* Sets the target platform.
*
* @param {(Platform|string)} platform the target platform.
* @return {!Capabilities} a self reference.
*/
setPlatform(platform: string): Capabilities;
/**
* @return {(string|undefined)} the configured platform or undefined if not
* set.
*/
getPlatform(): string|undefined;
/**
* @return {(string|undefined)} the configured platform or undefined if not
* set.
*/
getPlatform(): string | undefined;
/**
* Sets the logging preferences. Preferences may be specified as a
* {@link ./logging.Preferences} instance, or as a map of log-type to
* log-level.
* @param {!(./logging.Preferences|Object<string>)} prefs The logging
* preferences.
* @return {!Capabilities} A self reference.
*/
setLoggingPrefs(prefs: logging.Preferences|{}): Capabilities;
/**
* Sets the logging preferences. Preferences may be specified as a
* {@link ./logging.Preferences} instance, or as a map of log-type to
* log-level.
* @param {!(./logging.Preferences|Object<string>)} prefs The logging
* preferences.
* @return {!Capabilities} A self reference.
*/
setLoggingPrefs(prefs: logging.Preferences | {}): Capabilities;
/**
* Sets the proxy configuration for this instance.
* @param {proxy.Config} proxy The desired proxy configuration.
* @return {!Capabilities} A self reference.
*/
setProxy(proxy: ProxyConfig): Capabilities;
/**
* Sets the proxy configuration for this instance.
* @param {proxy.Config} proxy The desired proxy configuration.
* @return {!Capabilities} A self reference.
*/
setProxy(proxy: ProxyConfig): Capabilities;
/**
* @return {(proxy.Config|undefined)} the configured proxy settings, or
* undefined if not set.
*/
getProxy(): ProxyConfig|undefined;
/**
* @return {(proxy.Config|undefined)} the configured proxy settings, or
* undefined if not set.
*/
getProxy(): ProxyConfig | undefined;
/**
* Sets the default action to take with an unexpected alert before returning
* an error. If unspecified, WebDriver will default to
* {@link UserPromptHandler.DISMISS_AND_NOTIFY}.
*
* @param {?UserPromptHandler} behavior The way WebDriver should respond to
* unhandled user prompts.
* @return {!Capabilities} A self reference.
*/
setAlertBehavior(behavior: string): Capabilities;
/**
* Sets the default action to take with an unexpected alert before returning
* an error. If unspecified, WebDriver will default to
* {@link UserPromptHandler.DISMISS_AND_NOTIFY}.
*
* @param {?UserPromptHandler} behavior The way WebDriver should respond to
* unhandled user prompts.
* @return {!Capabilities} A self reference.
*/
setAlertBehavior(behavior: string): Capabilities;
/**
* @return {(UserPromptHandler|undefined)} the behavior pattern for responding
* to unhandled user prompts, or undefined if not set.
*/
getAlertBehavior(): string|undefined;
/**
* @return {(UserPromptHandler|undefined)} the behavior pattern for responding
* to unhandled user prompts, or undefined if not set.
*/
getAlertBehavior(): string | undefined;
// endregion
// endregion
}
export interface ITimeouts {
/**
* Defines when, in milliseconds, to interrupt a script that is being
* {@linkplain ./webdriver.IWebDriver#executeScript evaluated}.
*/
script?: number | undefined;
/**
* Defines when, in milliseconds, to interrupt a script that is being
* {@linkplain ./webdriver.IWebDriver#executeScript evaluated}.
*/
script?: number | undefined;
/**
* The timeout, in milliseconds, to apply to navigation events along with the
* {@link PageLoadStrategy}.
*/
pageLoad?: number | undefined;
/**
* The timeout, in milliseconds, to apply to navigation events along with the
* {@link PageLoadStrategy}.
*/
pageLoad?: number | undefined;
/**
* The maximum amount of time, in milliseconds, to spend attempting to
* {@linkplain ./webdriver.IWebDriver#findElement locate} an element on the
* current page.
*/
implicit?: number | undefined;
/**
* The maximum amount of time, in milliseconds, to spend attempting to
* {@linkplain ./webdriver.IWebDriver#findElement locate} an element on the
* current page.
*/
implicit?: number | undefined;
}

@@ -5,140 +5,145 @@ /**

export interface ICommandName {
GET_SERVER_STATUS: string;
GET_SERVER_STATUS: string;
NEW_SESSION: string;
GET_SESSIONS: string;
DESCRIBE_SESSION: string;
NEW_SESSION: string;
GET_SESSIONS: string;
DESCRIBE_SESSION: string;
CLOSE: string;
QUIT: string;
CLOSE: string;
QUIT: string;
GET_CURRENT_URL: string;
GET: string;
GO_BACK: string;
GO_FORWARD: string;
REFRESH: string;
GET_CURRENT_URL: string;
GET: string;
GO_BACK: string;
GO_FORWARD: string;
REFRESH: string;
ADD_COOKIE: string;
GET_COOKIE: string;
GET_ALL_COOKIES: string;
DELETE_COOKIE: string;
DELETE_ALL_COOKIES: string;
ADD_COOKIE: string;
GET_COOKIE: string;
GET_ALL_COOKIES: string;
DELETE_COOKIE: string;
DELETE_ALL_COOKIES: string;
GET_ACTIVE_ELEMENT: string;
FIND_ELEMENT: string;
FIND_ELEMENTS: string;
FIND_CHILD_ELEMENT: string;
FIND_CHILD_ELEMENTS: string;
GET_ACTIVE_ELEMENT: string;
FIND_ELEMENT: string;
FIND_ELEMENTS: string;
FIND_CHILD_ELEMENT: string;
FIND_CHILD_ELEMENTS: string;
CLEAR_ELEMENT: string;
CLICK_ELEMENT: string;
SEND_KEYS_TO_ELEMENT: string;
SUBMIT_ELEMENT: string;
CLEAR_ELEMENT: string;
CLICK_ELEMENT: string;
SEND_KEYS_TO_ELEMENT: string;
SUBMIT_ELEMENT: string;
GET_CURRENT_WINDOW_HANDLE: string;
GET_WINDOW_HANDLES: string;
GET_WINDOW_POSITION: string;
SET_WINDOW_POSITION: string;
GET_WINDOW_SIZE: string;
SET_WINDOW_SIZE: string;
MAXIMIZE_WINDOW: string;
GET_CURRENT_WINDOW_HANDLE: string;
GET_WINDOW_HANDLES: string;
GET_WINDOW_POSITION: string;
SET_WINDOW_POSITION: string;
GET_WINDOW_SIZE: string;
SET_WINDOW_SIZE: string;
MAXIMIZE_WINDOW: string;
SWITCH_TO_WINDOW: string;
SWITCH_TO_FRAME: string;
GET_PAGE_SOURCE: string;
GET_TITLE: string;
SWITCH_TO_WINDOW: string;
SWITCH_TO_FRAME: string;
GET_PAGE_SOURCE: string;
GET_TITLE: string;
EXECUTE_SCRIPT: string;
EXECUTE_ASYNC_SCRIPT: string;
EXECUTE_SCRIPT: string;
EXECUTE_ASYNC_SCRIPT: string;
GET_ELEMENT_TEXT: string;
GET_ELEMENT_TAG_NAME: string;
IS_ELEMENT_SELECTED: string;
IS_ELEMENT_ENABLED: string;
IS_ELEMENT_DISPLAYED: string;
GET_ELEMENT_LOCATION: string;
GET_ELEMENT_LOCATION_IN_VIEW: string;
GET_ELEMENT_SIZE: string;
GET_ELEMENT_ATTRIBUTE: string;
GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string;
ELEMENT_EQUALS: string;
GET_ELEMENT_TEXT: string;
GET_ELEMENT_TAG_NAME: string;
IS_ELEMENT_SELECTED: string;
IS_ELEMENT_ENABLED: string;
IS_ELEMENT_DISPLAYED: string;
GET_ELEMENT_LOCATION: string;
GET_ELEMENT_LOCATION_IN_VIEW: string;
GET_ELEMENT_SIZE: string;
GET_ELEMENT_ATTRIBUTE: string;
GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string;
ELEMENT_EQUALS: string;
SCREENSHOT: string;
IMPLICITLY_WAIT: string;
SET_SCRIPT_TIMEOUT: string;
SET_TIMEOUT: string;
SCREENSHOT: string;
IMPLICITLY_WAIT: string;
SET_SCRIPT_TIMEOUT: string;
SET_TIMEOUT: string;
ACCEPT_ALERT: string;
DISMISS_ALERT: string;
GET_ALERT_TEXT: string;
SET_ALERT_TEXT: string;
ACCEPT_ALERT: string;
DISMISS_ALERT: string;
GET_ALERT_TEXT: string;
SET_ALERT_TEXT: string;
EXECUTE_SQL: string;
GET_LOCATION: string;
SET_LOCATION: string;
GET_APP_CACHE: string;
GET_APP_CACHE_STATUS: string;
CLEAR_APP_CACHE: string;
IS_BROWSER_ONLINE: string;
SET_BROWSER_ONLINE: string;
EXECUTE_SQL: string;
GET_LOCATION: string;
SET_LOCATION: string;
GET_APP_CACHE: string;
GET_APP_CACHE_STATUS: string;
CLEAR_APP_CACHE: string;
IS_BROWSER_ONLINE: string;
SET_BROWSER_ONLINE: string;
GET_LOCAL_STORAGE_ITEM: string;
GET_LOCAL_STORAGE_KEYS: string;
SET_LOCAL_STORAGE_ITEM: string;
REMOVE_LOCAL_STORAGE_ITEM: string;
CLEAR_LOCAL_STORAGE: string;
GET_LOCAL_STORAGE_SIZE: string;
GET_LOCAL_STORAGE_ITEM: string;
GET_LOCAL_STORAGE_KEYS: string;
SET_LOCAL_STORAGE_ITEM: string;
REMOVE_LOCAL_STORAGE_ITEM: string;
CLEAR_LOCAL_STORAGE: string;
GET_LOCAL_STORAGE_SIZE: string;
GET_SESSION_STORAGE_ITEM: string;
GET_SESSION_STORAGE_KEYS: string;
SET_SESSION_STORAGE_ITEM: string;
REMOVE_SESSION_STORAGE_ITEM: string;
CLEAR_SESSION_STORAGE: string;
GET_SESSION_STORAGE_SIZE: string;
GET_SESSION_STORAGE_ITEM: string;
GET_SESSION_STORAGE_KEYS: string;
SET_SESSION_STORAGE_ITEM: string;
REMOVE_SESSION_STORAGE_ITEM: string;
CLEAR_SESSION_STORAGE: string;
GET_SESSION_STORAGE_SIZE: string;
SET_SCREEN_ORIENTATION: string;
GET_SCREEN_ORIENTATION: string;
SET_SCREEN_ORIENTATION: string;
GET_SCREEN_ORIENTATION: string;
// These belong to the Advanced user interactions - an element is
// optional for these commands.
CLICK: string;
DOUBLE_CLICK: string;
MOUSE_DOWN: string;
MOUSE_UP: string;
MOVE_TO: string;
SEND_KEYS_TO_ACTIVE_ELEMENT: string;
// These belong to the Advanced user interactions - an element is
// optional for these commands.
CLICK: string;
DOUBLE_CLICK: string;
MOUSE_DOWN: string;
MOUSE_UP: string;
MOVE_TO: string;
SEND_KEYS_TO_ACTIVE_ELEMENT: string;
// These belong to the Advanced Touch API
TOUCH_SINGLE_TAP: string;
TOUCH_DOWN: string;
TOUCH_UP: string;
TOUCH_MOVE: string;
TOUCH_SCROLL: string;
TOUCH_DOUBLE_TAP: string;
TOUCH_LONG_PRESS: string;
TOUCH_FLICK: string;
// These belong to the Advanced Touch API
TOUCH_SINGLE_TAP: string;
TOUCH_DOWN: string;
TOUCH_UP: string;
TOUCH_MOVE: string;
TOUCH_SCROLL: string;
TOUCH_DOUBLE_TAP: string;
TOUCH_LONG_PRESS: string;
TOUCH_FLICK: string;
GET_AVAILABLE_LOG_TYPES: string;
GET_LOG: string;
GET_SESSION_LOGS: string;
// Shadow DOM Commands
GET_SHADOW_ROOT: string;
FIND_ELEMENT_FROM_SHADOWROOT: string;
FIND_ELEMENTS_FROM_SHADOWROOT: string;
UPLOAD_FILE: string;
GET_AVAILABLE_LOG_TYPES: string;
GET_LOG: string;
GET_SESSION_LOGS: string;
ACTIONS: string;
CLEAR_ACTIONS: string;
UPLOAD_FILE: string;
LEGACY_ACTION_CLICK: string;
LEGACY_ACTION_DOUBLE_CLICK: string;
LEGACY_ACTION_MOUSE_DOWN: string;
LEGACY_ACTION_MOUSE_UP: string;
LEGACY_ACTION_MOUSE_MOVE: string;
LEGACY_ACTION_SEND_KEYS: string;
LEGACY_ACTION_TOUCH_DOWN: string;
LEGACY_ACTION_TOUCH_UP: string;
LEGACY_ACTION_TOUCH_MOVE: string;
LEGACY_ACTION_TOUCH_SCROLL: string;
LEGACY_ACTION_TOUCH_LONG_PRESS: string;
LEGACY_ACTION_TOUCH_FLICK: string;
LEGACY_ACTION_TOUCH_SINGLE_TAP: string;
LEGACY_ACTION_TOUCH_DOUBLE_TAP: string;
ACTIONS: string;
CLEAR_ACTIONS: string;
LEGACY_ACTION_CLICK: string;
LEGACY_ACTION_DOUBLE_CLICK: string;
LEGACY_ACTION_MOUSE_DOWN: string;
LEGACY_ACTION_MOUSE_UP: string;
LEGACY_ACTION_MOUSE_MOVE: string;
LEGACY_ACTION_SEND_KEYS: string;
LEGACY_ACTION_TOUCH_DOWN: string;
LEGACY_ACTION_TOUCH_UP: string;
LEGACY_ACTION_TOUCH_MOVE: string;
LEGACY_ACTION_TOUCH_SCROLL: string;
LEGACY_ACTION_TOUCH_LONG_PRESS: string;
LEGACY_ACTION_TOUCH_FLICK: string;
LEGACY_ACTION_TOUCH_SINGLE_TAP: string;
LEGACY_ACTION_TOUCH_DOUBLE_TAP: string;
}

@@ -157,47 +162,47 @@

export class Command {
// region Constructors
// region Constructors
/**
* @param {!CommandName} name The name of this command.
* @constructor
*/
constructor(name: string);
/**
* @param {!CommandName} name The name of this command.
* @constructor
*/
constructor(name: string);
// endregion
// endregion
// region Methods
// region Methods
/**
* @return {!CommandName} This command's name.
*/
getName(): string;
/**
* @return {!CommandName} This command's name.
*/
getName(): string;
/**
* Sets a parameter to send with this command.
* @param {string} name The parameter name.
* @param {*} value The parameter value.
* @return {!Command} A self reference.
*/
setParameter(name: string, value: any): Command;
/**
* Sets a parameter to send with this command.
* @param {string} name The parameter name.
* @param {*} value The parameter value.
* @return {!Command} A self reference.
*/
setParameter(name: string, value: any): Command;
/**
* Sets the parameters for this command.
* @param {!Object.<*>} parameters The command parameters.
* @return {!Command} A self reference.
*/
setParameters(parameters: any): Command;
/**
* Sets the parameters for this command.
* @param {!Object.<*>} parameters The command parameters.
* @return {!Command} A self reference.
*/
setParameters(parameters: any): Command;
/**
* Returns a named command parameter.
* @param {string} key The parameter key to look up.
* @return {*} The parameter value, or undefined if it has not been set.
*/
getParameter(key: string): any;
/**
* Returns a named command parameter.
* @param {string} key The parameter key to look up.
* @return {*} The parameter value, or undefined if it has not been set.
*/
getParameter(key: string): any;
/**
* @return {!Object.<*>} The parameters to send with this command.
*/
getParameters(): any;
/**
* @return {!Object.<*>} The parameters to send with this command.
*/
getParameters(): any;
// endregion
// endregion
}

@@ -210,28 +215,28 @@

export class Executor {
/**
* Defines a new command for use with this executor. When a command is sent,
* the {@code path} will be preprocessed using the command's parameters; any
* path segments prefixed with ':' will be replaced by the parameter of the
* same name. For example, given '/person/:name' and the parameters
* '{name: 'Bob'}', the final command path will be '/person/Bob'.
*
* @param {string} name The command name.
* @param {string} method The HTTP method to use when sending this command.
* @param {string} path The path to send the command to, relative to
* the WebDriver server's command root and of the form
* '/path/:variable/segment'.
*/
defineCommand(name: string, method: string, path: string): void;
/**
* Defines a new command for use with this executor. When a command is sent,
* the {@code path} will be preprocessed using the command's parameters; any
* path segments prefixed with ':' will be replaced by the parameter of the
* same name. For example, given '/person/:name' and the parameters
* '{name: 'Bob'}', the final command path will be '/person/Bob'.
*
* @param {string} name The command name.
* @param {string} method The HTTP method to use when sending this command.
* @param {string} path The path to send the command to, relative to
* the WebDriver server's command root and of the form
* '/path/:variable/segment'.
*/
defineCommand(name: string, method: string, path: string): void;
/**
* Executes the given {@code command}. If there is an error executing the
* command, the provided callback will be invoked with the offending error.
* Otherwise, the callback will be invoked with a null Error and non-null
* response object.
*
* @param {!Command} command The command to execute.
* @return {!Promise<?>} A promise that will be fulfilled with
* the command result.
*/
execute(command: Command): Promise<any>;
/**
* Executes the given {@code command}. If there is an error executing the
* command, the provided callback will be invoked with the offending error.
* Otherwise, the callback will be invoked with a null Error and non-null
* response object.
*
* @param {!Command} command The command to execute.
* @return {!Promise<?>} A promise that will be fulfilled with
* the command result.
*/
execute(command: Command): Promise<any>;
}

@@ -9,6 +9,6 @@ import { ILocation, WebDriver, WebElement } from '../';

export enum Origin {
/** Compute offsets relative to the pointer's current position. */
POINTER = 'pointer',
/** Compute offsets relative to the viewport. */
VIEWPORT = 'viewport',
/** Compute offsets relative to the pointer's current position. */
POINTER = 'pointer',
/** Compute offsets relative to the viewport. */
VIEWPORT = 'viewport',
}

@@ -20,85 +20,85 @@

export enum Button {
LEFT = 0,
MIDDLE = 1,
RIGHT = 2,
LEFT = 0,
MIDDLE = 1,
RIGHT = 2,
}
export interface IKey {
NULL: string;
CANCEL: string; // ^break
HELP: string;
BACK_SPACE: string;
TAB: string;
CLEAR: string;
RETURN: string;
ENTER: string;
SHIFT: string;
CONTROL: string;
ALT: string;
PAUSE: string;
ESCAPE: string;
SPACE: string;
PAGE_UP: string;
PAGE_DOWN: string;
END: string;
HOME: string;
ARROW_LEFT: string;
LEFT: string;
ARROW_UP: string;
UP: string;
ARROW_RIGHT: string;
RIGHT: string;
ARROW_DOWN: string;
DOWN: string;
INSERT: string;
DELETE: string;
SEMICOLON: string;
EQUALS: string;
NULL: string;
CANCEL: string; // ^break
HELP: string;
BACK_SPACE: string;
TAB: string;
CLEAR: string;
RETURN: string;
ENTER: string;
SHIFT: string;
CONTROL: string;
ALT: string;
PAUSE: string;
ESCAPE: string;
SPACE: string;
PAGE_UP: string;
PAGE_DOWN: string;
END: string;
HOME: string;
ARROW_LEFT: string;
LEFT: string;
ARROW_UP: string;
UP: string;
ARROW_RIGHT: string;
RIGHT: string;
ARROW_DOWN: string;
DOWN: string;
INSERT: string;
DELETE: string;
SEMICOLON: string;
EQUALS: string;
NUMPAD0: string; // number pad keys
NUMPAD1: string;
NUMPAD2: string;
NUMPAD3: string;
NUMPAD4: string;
NUMPAD5: string;
NUMPAD6: string;
NUMPAD7: string;
NUMPAD8: string;
NUMPAD9: string;
MULTIPLY: string;
ADD: string;
SEPARATOR: string;
SUBTRACT: string;
DECIMAL: string;
DIVIDE: string;
NUMPAD0: string; // number pad keys
NUMPAD1: string;
NUMPAD2: string;
NUMPAD3: string;
NUMPAD4: string;
NUMPAD5: string;
NUMPAD6: string;
NUMPAD7: string;
NUMPAD8: string;
NUMPAD9: string;
MULTIPLY: string;
ADD: string;
SEPARATOR: string;
SUBTRACT: string;
DECIMAL: string;
DIVIDE: string;
F1: string; // function keys
F2: string;
F3: string;
F4: string;
F5: string;
F6: string;
F7: string;
F8: string;
F9: string;
F10: string;
F11: string;
F12: string;
F1: string; // function keys
F2: string;
F3: string;
F4: string;
F5: string;
F6: string;
F7: string;
F8: string;
F9: string;
F10: string;
F11: string;
F12: string;
COMMAND: string; // Apple command key
META: string; // alias for Windows key
COMMAND: string; // Apple command key
META: string; // alias for Windows key
/**
* Simulate pressing many keys at once in a 'chord'. Takes a sequence of
* keys or strings, appends each of the values to a string,
* and adds the chord termination key ({@link Key.NULL}) and returns
* the resulting string.
*
* Note: when the low-level webdriver key handlers see Keys.NULL, active
* modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.
*
* @param {...string} var_args The key sequence to concatenate.
* @return {string} The null-terminated key sequence.
*/
chord(...var_args: Array<string|IKey>): string;
/**
* Simulate pressing many keys at once in a 'chord'. Takes a sequence of
* keys or strings, appends each of the values to a string,
* and adds the chord termination key ({@link Key.NULL}) and returns
* the resulting string.
*
* Note: when the low-level webdriver key handlers see Keys.NULL, active
* modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.
*
* @param {...string} var_args The key sequence to concatenate.
* @return {string} The null-terminated key sequence.
*/
chord(...var_args: Array<string | IKey>): string;
}

@@ -116,6 +116,6 @@

export interface IDirection {
x?: number|undefined;
y?: number|undefined;
duration?: number|undefined;
origin?: Origin|WebElement|undefined;
x?: number | undefined;
y?: number | undefined;
duration?: number | undefined;
origin?: Origin | WebElement | undefined;
}

@@ -125,3 +125,5 @@

export class Device { constructor(type: string, id: string); }
export class Device {
constructor(type: string, id: string);
}

@@ -147,194 +149,198 @@ export class Pointer extends Device {}

export class Actions {
// region Constructors
// region Constructors
constructor(executor: Executor, options?: {async: boolean,
bridge: boolean}|{async: boolean}|{bridge: boolean});
constructor(
executor: Executor,
options?: { async: boolean; bridge: boolean } | { async: boolean } | { bridge: boolean },
);
// endregion
// endregion
// region Methods
keyboard(): Keyboard;
mouse(): Pointer;
/**
* Executes this action sequence.
* @return {!Promise} A promise that will be resolved once
* this sequence has completed.
*/
clear(): Promise<void>;
// region Methods
keyboard(): Keyboard;
mouse(): Pointer;
/**
* Executes this action sequence.
* @return {!Promise} A promise that will be resolved once
* this sequence has completed.
*/
clear(): Promise<void>;
/**
* Executes this action sequence.
* @return {!Promise} A promise that will be resolved once
* this sequence has completed.
*/
perform(): Promise<void>;
/**
* Executes this action sequence.
* @return {!Promise} A promise that will be resolved once
* this sequence has completed.
*/
perform(): Promise<void>;
pause(duration?: number|Device, ...devices: Device[]): Actions;
pause(duration?: number | Device, ...devices: Device[]): Actions;
/**
* Inserts an action to press a mouse button at the mouse's current location.
* Defaults to `LEFT`.
*/
press(button?: Button): Actions;
/**
* Inserts an action to press a mouse button at the mouse's current location.
* Defaults to `LEFT`.
*/
press(button?: Button): Actions;
/**
* Inserts an action to release a mouse button at the mouse's current
* location. Defaults to `LEFT`.
*/
release(button?: Button): Actions;
/**
* Inserts an action to release a mouse button at the mouse's current
* location. Defaults to `LEFT`.
*/
release(button?: Button): Actions;
/**
* Inserts an action for moving the mouse `x` and `y` pixels relative to the
* specified `origin`. The `origin` may be defined as the mouse's
* {@linkplain ./input.Origin.POINTER current position}, the
* {@linkplain ./input.Origin.VIEWPORT viewport}, or the center of a specific
* {@linkplain ./webdriver.WebElement WebElement}.
*
* You may adjust how long the remote end should take, in milliseconds, to
* perform the move using the `duration` parameter (defaults to 100 ms).
* The number of incremental move events generated over this duration is an
* implementation detail for the remote end.
*
* Defaults to moving the mouse to the top-left
* corner of the viewport over 100ms.
*/
move(direction: IDirection): Actions;
/**
* Inserts an action for moving the mouse `x` and `y` pixels relative to the
* specified `origin`. The `origin` may be defined as the mouse's
* {@linkplain ./input.Origin.POINTER current position}, the
* {@linkplain ./input.Origin.VIEWPORT viewport}, or the center of a specific
* {@linkplain ./webdriver.WebElement WebElement}.
*
* You may adjust how long the remote end should take, in milliseconds, to
* perform the move using the `duration` parameter (defaults to 100 ms).
* The number of incremental move events generated over this duration is an
* implementation detail for the remote end.
*
* Defaults to moving the mouse to the top-left
* corner of the viewport over 100ms.
*/
move(direction: IDirection): Actions;
/**
* Moves the mouse. The location to move to may be specified in terms of the
* mouse's current location, an offset relative to the top-left corner of an
* element, or an element (in which case the middle of the element is used).
*
* @param {(!./WebElement|{x: number, y: number})} location The
* location to drag to, as either another WebElement or an offset in
* pixels.
* @param {{x: number, y: number}=} opt_offset If the target {@code location}
* is defined as a {@link ./WebElement}, this parameter defines
* an offset within that element. The offset should be specified in pixels
* relative to the top-left corner of the element's bounding box. If
* omitted, the element's center will be used as the target offset.
* @return {!Actions} A self reference.
*/
mouseMove(location: WebElement|ILocation, opt_offset?: ILocation): Actions;
/**
* Moves the mouse. The location to move to may be specified in terms of the
* mouse's current location, an offset relative to the top-left corner of an
* element, or an element (in which case the middle of the element is used).
*
* @param {(!./WebElement|{x: number, y: number})} location The
* location to drag to, as either another WebElement or an offset in
* pixels.
* @param {{x: number, y: number}=} opt_offset If the target {@code location}
* is defined as a {@link ./WebElement}, this parameter defines
* an offset within that element. The offset should be specified in pixels
* relative to the top-left corner of the element's bounding box. If
* omitted, the element's center will be used as the target offset.
* @return {!Actions} A self reference.
*/
mouseMove(location: WebElement | ILocation, opt_offset?: ILocation): Actions;
/**
* Presses a mouse button. The mouse button will not be released until
* {@link #mouseUp} is called, regardless of whether that call is made in this
* sequence or another. The behavior for out-of-order events (e.g. mouseDown,
* click) is undefined.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseDown()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!Actions} A self reference.
*/
mouseDown(opt_elementOrButton?: WebElement|string, opt_button?: string): Actions;
/**
* Presses a mouse button. The mouse button will not be released until
* {@link #mouseUp} is called, regardless of whether that call is made in this
* sequence or another. The behavior for out-of-order events (e.g. mouseDown,
* click) is undefined.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseDown()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!Actions} A self reference.
*/
mouseDown(opt_elementOrButton?: WebElement | string, opt_button?: string): Actions;
/**
* Releases a mouse button. Behavior is undefined for calling this function
* without a previous call to {@link #mouseDown}.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseUp()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!Actions} A self reference.
*/
mouseUp(opt_elementOrButton?: WebElement|string, opt_button?: string): Actions;
/**
* Releases a mouse button. Behavior is undefined for calling this function
* without a previous call to {@link #mouseDown}.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseUp()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!Actions} A self reference.
*/
mouseUp(opt_elementOrButton?: WebElement | string, opt_button?: string): Actions;
/**
* Convenience function for performing a 'drag and drop' manuever. The target
* element may be moved to the location of another element, or by an offset (in
* pixels).
*/
dragAndDrop(from: WebElement, to?: WebElement|{x?: number | string | undefined, y?: number|string | undefined}|null):
Actions;
/**
* Convenience function for performing a 'drag and drop' manuever. The target
* element may be moved to the location of another element, or by an offset (in
* pixels).
*/
dragAndDrop(
from: WebElement,
to?: WebElement | { x?: number | string | undefined; y?: number | string | undefined } | null,
): Actions;
/**
* Short-hand for performing a simple left-click (down/up) with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
click(element?: WebElement): Actions;
/**
* Short-hand for performing a simple left-click (down/up) with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
click(element?: WebElement): Actions;
/**
* Short-hand for performing a double left-click with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
doubleClick(element?: WebElement): Actions;
/**
* Short-hand for performing a double left-click with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
doubleClick(element?: WebElement): Actions;
/**
* Short-hand for performing a simple right-click (down/up) with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
contextClick(element?: WebElement): Actions;
/**
* Short-hand for performing a simple right-click (down/up) with the mouse.
*
* @param {./WebElement=} element If specified, the mouse will
* first be moved to the center of the element before performing the
* click.
* @return {!Actions} a self reference.
*/
contextClick(element?: WebElement): Actions;
/**
* Performs a modifier key press. The modifier key is <em>not released</em>
* until {@link #keyUp} or {@link #sendKeys} is called. The key press will be
* targetted at the currently focused element.
* @param {!Key} key The modifier key to push. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
keyDown(key: string): Actions;
/**
* Performs a modifier key press. The modifier key is <em>not released</em>
* until {@link #keyUp} or {@link #sendKeys} is called. The key press will be
* targetted at the currently focused element.
* @param {!Key} key The modifier key to push. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
keyDown(key: string): Actions;
/**
* Performs a modifier key release. The release is targetted at the currently
* focused element.
* @param {!Key} key The modifier key to release. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
keyUp(key: string): Actions;
/**
* Performs a modifier key release. The release is targetted at the currently
* focused element.
* @param {!Key} key The modifier key to release. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
keyUp(key: string): Actions;
/**
* Simulates typing multiple keys. Each modifier key encountered in the
* sequence will not be released until it is encountered again. All key events
* will be targeted at the currently focused element.
*
* @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
* The keys to type.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
sendKeys(...var_args: Array<string|Promise<string>>): Actions;
/**
* Simulates typing multiple keys. Each modifier key encountered in the
* sequence will not be released until it is encountered again. All key events
* will be targeted at the currently focused element.
*
* @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
* The keys to type.
* @return {!Actions} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
sendKeys(...var_args: Array<string | Promise<string>>): Actions;
// endregion
// endregion
}

@@ -7,65 +7,65 @@ /**

export class Level {
name_: string;
value_: number;
name_: string;
value_: number;
/**
* @param {string} name the level's name.
* @param {number} level the level's numeric value.
*/
constructor(name: string, level: number);
/**
* @param {string} name the level's name.
* @param {number} level the level's numeric value.
*/
constructor(name: string, level: number);
/** @override */
toString(): string;
/** @override */
toString(): string;
/** This logger's name. */
name: string;
/** This logger's name. */
name: string;
/** The numeric log level. */
value: number;
/** The numeric log level. */
value: number;
/**
* Indicates no log messages should be recorded.
* @const
*/
static OFF: Level;
/**
* Log messages with a level of `1000` or higher.
* @const
*/
static SEVERE: Level;
/**
* Log messages with a level of `900` or higher.
* @const
*/
static WARNING: Level;
/**
* Log messages with a level of `800` or higher.
* @const
*/
static INFO: Level;
/**
* Log messages with a level of `700` or higher.
* @const
*/
static DEBUG: Level;
/**
* Log messages with a level of `500` or higher.
* @const
*/
static FINE: Level;
/**
* Log messages with a level of `400` or higher.
* @const
*/
static FINER: Level;
/**
* Log messages with a level of `300` or higher.
* @const
*/
static FINEST: Level;
/**
* Indicates all log messages should be recorded.
* @const
*/
static ALL: Level;
/**
* Indicates no log messages should be recorded.
* @const
*/
static OFF: Level;
/**
* Log messages with a level of `1000` or higher.
* @const
*/
static SEVERE: Level;
/**
* Log messages with a level of `900` or higher.
* @const
*/
static WARNING: Level;
/**
* Log messages with a level of `800` or higher.
* @const
*/
static INFO: Level;
/**
* Log messages with a level of `700` or higher.
* @const
*/
static DEBUG: Level;
/**
* Log messages with a level of `500` or higher.
* @const
*/
static FINE: Level;
/**
* Log messages with a level of `400` or higher.
* @const
*/
static FINER: Level;
/**
* Log messages with a level of `300` or higher.
* @const
*/
static FINEST: Level;
/**
* Indicates all log messages should be recorded.
* @const
*/
static ALL: Level;
}

@@ -84,6 +84,6 @@

export interface IEntryJSON {
level: string;
message: string;
timestamp: number;
type: string;
level: string;
message: string;
timestamp: number;
type: string;
}

@@ -95,30 +95,30 @@

export class Entry {
/**
* @param {(!logging.Level|string)} level The entry level.
* @param {string} message The log message.
* @param {number=} opt_timestamp The time this entry was generated, in
* milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the
* current time will be used.
* @param {string=} opt_type The log type, if known.
* @constructor
*/
constructor(level: Level | string | number, message: string, opt_timestamp?: number, opt_type?: string | IType);
/**
* @param {(!logging.Level|string)} level The entry level.
* @param {string} message The log message.
* @param {number=} opt_timestamp The time this entry was generated, in
* milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the
* current time will be used.
* @param {string=} opt_type The log type, if known.
* @constructor
*/
constructor(level: Level | string | number, message: string, opt_timestamp?: number, opt_type?: string | IType);
/** @type {!logging.Level} */
level: Level;
/** @type {!logging.Level} */
level: Level;
/** @type {string} */
message: string;
/** @type {string} */
message: string;
/** @type {number} */
timestamp: number;
/** @type {number} */
timestamp: number;
/** @type {string} */
type: string;
/** @type {string} */
type: string;
/**
* @return {{level: string, message: string, timestamp: number,
* type: string}} The JSON representation of this entry.
*/
toJSON(): IEntryJSON;
/**
* @return {{level: string, message: string, timestamp: number,
* type: string}} The JSON representation of this entry.
*/
toJSON(): IEntryJSON;
}

@@ -143,118 +143,118 @@

export class Logger {
/**
* @param {string} name the name of this logger.
* @param {Level=} opt_level the initial level for this logger.
*/
constructor(name: string, opt_level?: Level);
/**
* @param {string} name the name of this logger.
* @param {Level=} opt_level the initial level for this logger.
*/
constructor(name: string, opt_level?: Level);
/** @private {string} */
name_: string;
/** @private {Level} */
level_: Level;
/** @private {Logger} */
parent_: Logger;
/** @private {Set<function(!Entry)>} */
handlers_: any;
/** @private {string} */
name_: string;
/** @private {Level} */
level_: Level;
/** @private {Logger} */
parent_: Logger;
/** @private {Set<function(!Entry)>} */
handlers_: any;
/** @return {string} the name of this logger. */
getName(): string;
/** @return {string} the name of this logger. */
getName(): string;
/**
* @param {Level} level the new level for this logger, or `null` if the logger
* should inherit its level from its parent logger.
*/
setLevel(level: Level): void;
/**
* @param {Level} level the new level for this logger, or `null` if the logger
* should inherit its level from its parent logger.
*/
setLevel(level: Level): void;
/** @return {Level} the log level for this logger. */
getLevel(): Level;
/** @return {Level} the log level for this logger. */
getLevel(): Level;
/**
* @return {!Level} the effective level for this logger.
*/
getEffectiveLevel(): Level;
/**
* @return {!Level} the effective level for this logger.
*/
getEffectiveLevel(): Level;
/**
* @param {!Level} level the level to check.
* @return {boolean} whether messages recorded at the given level are loggable
* by this instance.
*/
isLoggable(level: Level): boolean;
/**
* @param {!Level} level the level to check.
* @return {boolean} whether messages recorded at the given level are loggable
* by this instance.
*/
isLoggable(level: Level): boolean;
/**
* Adds a handler to this logger. The handler will be invoked for each message
* logged with this instance, or any of its descendants.
*
* @param {function(!Entry)} handler the handler to add.
*/
addHandler(handler: any): void;
/**
* Adds a handler to this logger. The handler will be invoked for each message
* logged with this instance, or any of its descendants.
*
* @param {function(!Entry)} handler the handler to add.
*/
addHandler(handler: any): void;
/**
* Removes a handler from this logger.
*
* @param {function(!Entry)} handler the handler to remove.
* @return {boolean} whether a handler was successfully removed.
*/
removeHandler(handler: any): void;
/**
* Removes a handler from this logger.
*
* @param {function(!Entry)} handler the handler to remove.
* @return {boolean} whether a handler was successfully removed.
*/
removeHandler(handler: any): void;
/**
* Logs a message at the given level. The message may be defined as a string
* or as a function that will return the message. If a function is provided,
* it will only be invoked if this logger's
* {@linkplain #getEffectiveLevel() effective log level} includes the given
* `level`.
*
* @param {!Level} level the level at which to log the message.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
log(level: Level, loggable: string | Function): void;
/**
* Logs a message at the given level. The message may be defined as a string
* or as a function that will return the message. If a function is provided,
* it will only be invoked if this logger's
* {@linkplain #getEffectiveLevel() effective log level} includes the given
* `level`.
*
* @param {!Level} level the level at which to log the message.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
log(level: Level, loggable: string | Function): void;
/**
* Logs a message at the {@link Level.SEVERE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
severe(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.SEVERE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
severe(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.WARNING} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
warning(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.WARNING} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
warning(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.INFO} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
info(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.INFO} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
info(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.DEBUG} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
debug(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.DEBUG} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
debug(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
fine(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
fine(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINER} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finer(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINER} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finer(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINEST} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finest(loggable: string | Function): void;
/**
* Logs a message at the {@link Level.FINEST} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finest(loggable: string | Function): void;
}

@@ -268,21 +268,21 @@

export class LogManager {
/**
* Retrieves a named logger, creating it in the process. This function will
* implicitly create the requested logger, and any of its parents, if they
* do not yet exist.
*
* @param {string} name the logger's name.
* @return {!Logger} the requested logger.
*/
getLogger(name?: string): Logger;
/**
* Retrieves a named logger, creating it in the process. This function will
* implicitly create the requested logger, and any of its parents, if they
* do not yet exist.
*
* @param {string} name the logger's name.
* @return {!Logger} the requested logger.
*/
getLogger(name?: string): Logger;
/**
* Creates a new logger.
*
* @param {string} name the logger's name.
* @param {!Logger} parent the logger's parent.
* @return {!Logger} the new logger.
* @private
*/
createLogger_(name: string, parent: Logger): Logger;
/**
* Creates a new logger.
*
* @param {string} name the logger's name.
* @param {!Logger} parent the logger's parent.
* @return {!Logger} the new logger.
* @private
*/
createLogger_(name: string, parent: Logger): Logger;
}

@@ -324,12 +324,12 @@

export interface IType {
/** Logs originating from the browser. */
BROWSER: string;
/** Logs from a WebDriver client. */
CLIENT: string;
/** Logs from a WebDriver implementation. */
DRIVER: string;
/** Logs related to performance. */
PERFORMANCE: string;
/** Logs from the remote server. */
SERVER: string;
/** Logs originating from the browser. */
BROWSER: string;
/** Logs from a WebDriver client. */
CLIENT: string;
/** Logs from a WebDriver implementation. */
DRIVER: string;
/** Logs related to performance. */
PERFORMANCE: string;
/** Logs from the remote server. */
SERVER: string;
}

@@ -347,20 +347,20 @@

export class Preferences {
prefs_: Map<string, Level>;
prefs_: Map<string, Level>;
constructor();
constructor();
/**
* Sets the desired logging level for a particular log type.
* @param {(string|Type)} type The log type.
* @param {(!Level|string|number)} level The desired log level.
* @throws {TypeError} if `type` is not a `string`.
*/
setLevel(type: string | IType, level: Level): void;
/**
* Sets the desired logging level for a particular log type.
* @param {(string|Type)} type The log type.
* @param {(!Level|string|number)} level The desired log level.
* @throws {TypeError} if `type` is not a `string`.
*/
setLevel(type: string | IType, level: Level): void;
/**
* Converts this instance to its JSON representation.
* @return {!Object<string, string>} The JSON representation of this set of
* preferences.
*/
toJSON(): { [key: string]: string };
/**
* Converts this instance to its JSON representation.
* @return {!Object<string, string>} The JSON representation of this set of
* preferences.
*/
toJSON(): { [key: string]: string };
}

@@ -8,110 +8,114 @@ import { EventEmitter } from '../';

export namespace promise {
// region Functions
// region Functions
/**
* Determines whether a {@code value} should be treated as a promise.
* Any object whose 'then' property is a function will be considered a
* promise.
*/
function isPromise(value: any): boolean;
/**
* Determines whether a {@code value} should be treated as a promise.
* Any object whose 'then' property is a function will be considered a
* promise.
*/
function isPromise(value: any): boolean;
/**
* Creates a promise that will be resolved at a set time in the future.
*/
function delayed(ms: number): Promise<void>;
/**
* Creates a promise that will be resolved at a set time in the future.
*/
function delayed(ms: number): Promise<void>;
/**
* Calls a function for each element in an array, and if the function returns
* true adds the element to a new array.
*
* If the return value of the filter function is a promise, this function
* will wait for it to be fulfilled before determining whether to insert the
* element into the new array.
*
* If the filter function throws or returns a rejected promise, the promise
* returned by this function will be rejected with the same reason. Only the
* first failure will be reported; all subsequent errors will be silently
* ignored.
*/
function filter<T, V>(
arr: T[]|Promise<T[]>, fn: (element: T, index: number, array: T[]) => V,
// value
optSelf?: any): Promise<V[]>;
/**
* Calls a function for each element in an array, and if the function returns
* true adds the element to a new array.
*
* If the return value of the filter function is a promise, this function
* will wait for it to be fulfilled before determining whether to insert the
* element into the new array.
*
* If the filter function throws or returns a rejected promise, the promise
* returned by this function will be rejected with the same reason. Only the
* first failure will be reported; all subsequent errors will be silently
* ignored.
*/
function filter<T, V>(
arr: T[] | Promise<T[]>,
fn: (element: T, index: number, array: T[]) => V,
// value
optSelf?: any,
): Promise<V[]>;
/**
* Calls a function for each element in an array and inserts the result into a
* new array, which is used as the fulfillment value of the promise returned
* by this function.
*
* If the return value of the mapping function is a promise, this function
* will wait for it to be fulfilled before inserting it into the new array.
*
* If the mapping function throws or returns a rejected promise, the
* promise returned by this function will be rejected with the same reason.
* Only the first failure will be reported; all subsequent errors will be
* silently ignored.
*/
function map<T, V>(
arr: T[]|Promise<T[]>, fn: (self: any, type: T, index: number, array: T[]) => V,
optSelf?: any): Promise<V[]>;
/**
* Calls a function for each element in an array and inserts the result into a
* new array, which is used as the fulfillment value of the promise returned
* by this function.
*
* If the return value of the mapping function is a promise, this function
* will wait for it to be fulfilled before inserting it into the new array.
*
* If the mapping function throws or returns a rejected promise, the
* promise returned by this function will be rejected with the same reason.
* Only the first failure will be reported; all subsequent errors will be
* silently ignored.
*/
function map<T, V>(
arr: T[] | Promise<T[]>,
fn: (self: any, type: T, index: number, array: T[]) => V,
optSelf?: any,
): Promise<V[]>;
/**
* Wraps a function that expects a node-style callback as its final
* argument. This callback expects two arguments: an error value (which will
* be null if the call succeeded), and the success value as the second
* argument. The callback will the resolve or reject the returned promise,
* based on its arguments.
*/
function checkedNodeCall<T>(fn: Function, ...varArgs: any[]): Promise<T>;
/**
* Wraps a function that expects a node-style callback as its final
* argument. This callback expects two arguments: an error value (which will
* be null if the call succeeded), and the success value as the second
* argument. The callback will the resolve or reject the returned promise,
* based on its arguments.
*/
function checkedNodeCall<T>(fn: Function, ...varArgs: any[]): Promise<T>;
/**
* Returns a promise that will be resolved with the input value in a
* fully-resolved state. If the value is an array, each element will be fully
* resolved. Likewise, if the value is an object, all keys will be fully
* resolved. In both cases, all nested arrays and objects will also be
* fully resolved. All fields are resolved in place; the returned promise
* will resolve on {@code value} and not a copy.
*
* Warning: This function makes no checks against objects that contain
* cyclical references:
*
* var value = {};
* value['self'] = value;
* promise.fullyResolved(value); // Stack overflow.
*/
function fullyResolved(value: any): Promise<any>;
/**
* Returns a promise that will be resolved with the input value in a
* fully-resolved state. If the value is an array, each element will be fully
* resolved. Likewise, if the value is an object, all keys will be fully
* resolved. In both cases, all nested arrays and objects will also be
* fully resolved. All fields are resolved in place; the returned promise
* will resolve on {@code value} and not a copy.
*
* Warning: This function makes no checks against objects that contain
* cyclical references:
*
* var value = {};
* value['self'] = value;
* promise.fullyResolved(value); // Stack overflow.
*/
function fullyResolved(value: any): Promise<any>;
/**
* Registers a listener to invoke when a promise is resolved, regardless
* of whether the promise's value was successfully computed. This function
* is synonymous with the {@code finally} clause in a synchronous API:
*
* // Synchronous API:
* try {
* doSynchronousWork();
* } finally {
* cleanUp();
* }
*
* // Asynchronous promise API:
* doAsynchronousWork().finally(cleanUp);
*
* __Note:__ similar to the {@code finally} clause, if the registered
* callback returns a rejected promise or throws an error, it will silently
* replace the rejection error (if any) from this promise:
*
* try {
* throw Error('one');
* } finally {
* throw Error('two'); // Hides Error: one
* }
*
* let p = Promise.reject(Error('one'));
* promise.finally(p, function() {
* throw Error('two'); // Hides Error: one
* });
*/
function thenFinally<R>(promise: any, callback: () => R | Promise<R>): Promise<R>;
/**
* Registers a listener to invoke when a promise is resolved, regardless
* of whether the promise's value was successfully computed. This function
* is synonymous with the {@code finally} clause in a synchronous API:
*
* // Synchronous API:
* try {
* doSynchronousWork();
* } finally {
* cleanUp();
* }
*
* // Asynchronous promise API:
* doAsynchronousWork().finally(cleanUp);
*
* __Note:__ similar to the {@code finally} clause, if the registered
* callback returns a rejected promise or throws an error, it will silently
* replace the rejection error (if any) from this promise:
*
* try {
* throw Error('one');
* } finally {
* throw Error('two'); // Hides Error: one
* }
*
* let p = Promise.reject(Error('one'));
* promise.finally(p, function() {
* throw Error('two'); // Hides Error: one
* });
*/
function thenFinally<R>(promise: any, callback: () => R | Promise<R>): Promise<R>;
// endregion
// endregion
}
export interface ISymbols {
/**
* The serialize symbol specifies a method that returns an object's serialized
* representation. If an object's serialized form is not immediately
* available, the serialize method will return a promise that will be resolved
* with the serialized form.
*
* Note that the described method is analogous to objects that define a
* `toJSON()` method, except the serialized result may be a promise, or
* another object with a promised property.
*/
readonly serialize: unique symbol;
/**
* The serialize symbol specifies a method that returns an object's serialized
* representation. If an object's serialized form is not immediately
* available, the serialize method will return a promise that will be resolved
* with the serialized form.
*
* Note that the described method is analogous to objects that define a
* `toJSON()` method, except the serialized result may be a promise, or
* another object with a promised property.
*/
readonly serialize: unique symbol;
}

@@ -14,0 +14,0 @@

@@ -23,3 +23,4 @@ import { Alert, By, ByHash, Condition, Locator, WebDriver, WebElement, WebElementCondition } from '../';

export function ableToSwitchToFrame(
frame: number|WebElement|By|((webdriver: WebDriver) => WebElement)|ByHash): Condition<boolean>;
frame: number | WebElement | By | ((webdriver: WebDriver) => WebElement) | ByHash,
): Condition<boolean>;

@@ -26,0 +27,0 @@ /**

{
"name": "@types/selenium-webdriver",
"version": "4.0.20",
"version": "4.1.0",
"description": "TypeScript definitions for Selenium WebDriverJS",

@@ -70,4 +70,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver",

},
"typesPublisherContentHash": "07040b448fe58cb36cf6c62bce8f5880caf62d9ddadc38d572f39cc2a2d61062",
"typesPublisherContentHash": "df8b641f8b8101f584302cca1fa04144a0f44fcd4d5c463952fa6e595efd2dbe",
"typeScriptVersion": "3.9"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sat, 07 May 2022 17:31:36 GMT
* Last updated: Thu, 12 May 2022 18:01:35 GMT
* Dependencies: [@types/ws](https://npmjs.com/package/@types/ws)

@@ -14,0 +14,0 @@ * Global values: none

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc