DefinitelyTyped/types/selenium-webdriver/edge.d.ts
Craig Nishina b272bb7fbf chore(selenium): update to selenium-webdriver 4 typings
- Update typings and tests
  - control flow and promise.Promise deprecated
  - API changes with regard to W3C
- Moved previous typings to selenium-webdriver v3
- Set protractor-helpers to use selenium-webdriver v3
2019-03-29 12:54:10 -07:00

75 lines
2.5 KiB
TypeScript

import * as webdriver from './index';
import * as remote from './remote';
export class Driver extends webdriver.WebDriver {
/**
* Creates a new browser session for Microsoft's Edge browser.
*
* @param {(capabilities.Capabilities|Options)=} opt_config The configuration
* options.
* @param {remote.DriverService=} opt_service The session to use; will use
* the {@linkplain #getDefaultService default service} by default.
* @return {!Driver} A new driver instance.
*/
static createSession(
opt_config?: webdriver.CreateSessionCapabilities, opt_service?: remote.DriverService): Driver;
/**
* This function is a no-op as file detectors are not supported by this
* implementation.
* @override
*/
setFileDetector(): void;
}
/**
* Class for managing MicrosoftEdgeDriver specific options.
*/
export class Options extends webdriver.Capabilities {
/**
* Sets the proxy settings for the new session.
* @param {capabilities.ProxyConfig} proxy The proxy configuration to use.
* @return {!Options} A self reference.
*/
setProxy(proxy: webdriver.ProxyConfig): Options;
/**
* Sets the page load strategy for Edge.
* Supported values are 'normal', 'eager', and 'none';
*
* @param {string} pageLoadStrategy The page load strategy to use.
* @return {!Options} A self reference.
*/
setPageLoadStrategy(pageLoadStrategy: string): Options;
}
/**
* Creates {@link remote.DriverService} instances that manage a
* MicrosoftEdgeDriver server in a child process.
*/
export class ServiceBuilder extends remote.DriverService.Builder {
/**
* @param {string=} opt_exe Path to the server executable to use. If omitted,
* the builder will attempt to locate the MicrosoftEdgeDriver on the current
* PATH.
* @throws {Error} If provided executable does not exist, or the
* MicrosoftEdgeDriver cannot be found on the PATH.
*/
constructor(opt_exe?: string);
}
/**
* Returns the default MicrosoftEdgeDriver service. If such a service has
* not been configured, one will be constructed using the default configuration
* for an MicrosoftEdgeDriver executable found on the system PATH.
* @return {!remote.DriverService} The default MicrosoftEdgeDriver service.
*/
export function getDefaultService(): remote.DriverService;
/**
* Sets the default service to use for new MicrosoftEdgeDriver instances.
* @param {!remote.DriverService} service The service to use.
* @throws {Error} If the default service is currently running.
*/
export function setDefaultService(service: remote.DriverService): void;