DefinitelyTyped/types/selenium-webdriver/safari.d.ts
Ziyu 9d84944e75 Update selenium-webdriver capabilities (#41043)
* add lib/capabilities.d.ts

* update capabilities to match implementation

* fix test
2019-12-16 11:29:57 +00:00

66 lines
1.9 KiB
TypeScript

import * as webdriver from './index';
export class Server {}
/**
* @return {!Promise<string>} A promise that will resolve with the path
* to Safari on the current system.
*/
export function findSafariDriver(): any;
/**
* @param {string} serverUrl The URL to connect to.
* @return {!Promise<string>} A promise for the path to a file that Safari can
* open on start-up to trigger a new connection to the WebSocket server.
*/
export function createConnectFile(serverUrl: string): any;
/**
* Deletes all session data files if so desired.
* @param {!Object} desiredCapabilities .
* @return {!Array<promise.Promise>} A list of promises for the deleted files.
*/
export function cleanSession(desiredCapabilities: webdriver.Capabilities): any[];
/** @return {string} . */
export function getRandomString(): string;
/**
* @implements {command.Executor}
*/
export class CommandExecutor {}
/**
* Configuration options specific to the {@link Driver SafariDriver}.
*/
export class Options extends webdriver.Capabilities {
/**
* Instruct the SafariDriver to use the Safari Technology Preview if true.
* Otherwise, use the release version of Safari. Defaults to using the release version of Safari.
*
* @param {boolean} useTechnologyPreview
* @return {!Options} A self reference.
*/
setTechnologyPreview(useTechnologyPreview: boolean): Options;
}
/**
* A WebDriver client for Safari. This class should never be instantiated
* directly; instead, use the {@linkplain ./builder.Builder Builder}:
*
* var driver = new Builder()
* .forBrowser('safari')
* .build();
*
*/
export class Driver extends webdriver.WebDriver {
/**
* Creates a new Safari session.
*
* @param {(Options|Capabilities)=} opt_config The configuration
* options for the new session.
* @return {!Driver} A new driver instance.
*/
static createSession(opt_config?: Options|webdriver.Capabilities): Driver;
}