mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added setBrowserName and setBrowserVersions Capabilities methods description for selenium-webdriver module. (#38978)
This commit is contained in:
parent
f293f702e8
commit
7e7335f867
17
types/selenium-webdriver/index.d.ts
vendored
17
types/selenium-webdriver/index.d.ts
vendored
@ -7,6 +7,7 @@
|
||||
// Ben Dixon <https://github.com/bendxn>,
|
||||
// Ziyu <https://github.com/oddui>
|
||||
// Johann Wolf <https://github.com/beta-vulgaris>
|
||||
// Aleksey Chemakin <https://github.com/Dzenly>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
@ -1392,6 +1393,22 @@ export class Capabilities {
|
||||
*/
|
||||
set(key: string, value: any): Capabilities;
|
||||
|
||||
/**
|
||||
* 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 desired version of the target browser.
|
||||
*
|
||||
* @param {string} version the desired version.
|
||||
* @return {!Capabilities} a self reference.
|
||||
*/
|
||||
setBrowserVersion(version: string): Capabilities;
|
||||
|
||||
/**
|
||||
* Sets the logging preferences. Preferences may be specified as a
|
||||
* {@link logging.Preferences} instance, or a as a map of log-type to
|
||||
|
||||
@ -112,6 +112,9 @@ function TestCapabilities() {
|
||||
capabilities = capabilities.setScrollBehavior(1);
|
||||
capabilities = capabilities.setAlertBehavior('accept');
|
||||
capabilities = capabilities.setAlertBehavior();
|
||||
capabilities = capabilities.setBrowserName('myBrowserName');
|
||||
capabilities = capabilities.setBrowserName(webdriver.Browser.ANDROID);
|
||||
capabilities = capabilities.setBrowserVersion('10.3.4');
|
||||
|
||||
anything = capabilities.toJSON();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user