@wdio/types
Version:
Utility package providing type information for a variety of WebdriverIO interfaces
1,237 lines • 67.9 kB
TypeScript
import type { WebDriver as WebDriverOptions, WebdriverIO as WebDriverIOOptions, Connection as ConnectionOptions } from './Options.js';
type JSONLike = {
[property: string]: JSONLike;
} | readonly JSONLike[] | string | number | boolean | null;
type RemoveAppiumPrefix<T> = {
[K in keyof T as K extends `appium:${infer R}` ? R : K]: T[K];
};
export type PageLoadingStrategy = 'none' | 'eager' | 'normal';
export type LoggingPreferenceType = 'OFF' | 'SEVERE' | 'WARNING' | 'INFO' | 'CONFIG' | 'FINE' | 'FINER' | 'FINEST' | 'ALL';
export interface LoggingPreferences {
browser?: LoggingPreferenceType;
driver?: LoggingPreferenceType;
server?: LoggingPreferenceType;
client?: LoggingPreferenceType;
}
export type Timeouts = Record<'script' | 'pageLoad' | 'implicit', number>;
export type ProxyTypes = 'pac' | 'noproxy' | 'autodetect' | 'system' | 'manual';
export interface ProxyObject {
proxyType?: ProxyTypes;
proxyAutoconfigUrl?: string;
ftpProxy?: string;
ftpProxyPort?: number;
httpProxy?: string;
httpProxyPort?: number;
sslProxy?: string;
sslProxyPort?: number;
socksProxy?: string;
socksProxyPort?: number;
socksVersion?: string;
socksUsername?: string;
socksPassword?: string;
noProxy?: string[];
}
declare global {
namespace WebdriverIO {
interface Capabilities extends VendorExtensions, ConnectionOptions {
/**
* Identifies the user agent.
*/
browserName?: string;
/**
* Identifies the version of the user agent.
*/
browserVersion?: string;
/**
* Identifies the operating system of the endpoint node.
*/
platformName?: string;
/**
* Indicates whether untrusted and self-signed TLS certificates are implicitly trusted on navigation for the duration of the session.
*/
acceptInsecureCerts?: boolean;
/**
* Defines the current session’s page load strategy.
*/
pageLoadStrategy?: PageLoadingStrategy;
/**
* Defines the current session’s proxy configuration.
*/
proxy?: ProxyObject;
/**
* Indicates whether the remote end supports all of the resizing and repositioning commands.
*/
setWindowRect?: boolean;
/**
* Describes the timeouts imposed on certain session operations.
*/
timeouts?: Timeouts;
/**
* Defines the current session’s strict file interactability.
*/
strictFileInteractability?: boolean;
/**
* Describes the current session’s user prompt handler. Defaults to the dismiss and notify state.
*/
unhandledPromptBehavior?: string;
/**
* WebDriver clients opt in to a bidirectional connection by requesting a capability with the name "webSocketUrl" and value true.
*/
webSocketUrl?: boolean;
}
}
}
export interface W3CCapabilities {
alwaysMatch: WebdriverIO.Capabilities;
firstMatch: WebdriverIO.Capabilities[];
}
export type RequestedStandaloneCapabilities = W3CCapabilities | WebdriverIO.Capabilities;
export type RequestedMultiremoteCapabilities = {
[instanceName: string]: WebDriverIOOptions & WithRequestedCapabilities;
};
/**
* Configuration object for the `webdriver` package
*/
export type RemoteConfig = WebDriverOptions & WithRequestedCapabilities;
/**
* Configuration object for the `webdriverio` package
*/
export type WebdriverIOConfig = WebDriverIOOptions & WithRequestedCapabilities;
export type WebdriverIOMultiremoteConfig = WebDriverIOOptions & {
capabilities: RequestedMultiremoteCapabilities;
};
/**
* A type referencing all possible capability types when using Testrunner
* e.g. everything a user can provide in the `capabilities` property
*/
export type TestrunnerCapabilities = RequestedStandaloneCapabilities[] | RequestedMultiremoteCapabilities | RequestedMultiremoteCapabilities[];
/**
* The capabilities that will be resolved within a worker instance, e.g. either
* a single set of capabilities or a single multiremote instance
*/
export type ResolvedTestrunnerCapabilities = WebdriverIO.Capabilities | Record<string, WebdriverIO.Capabilities>;
/**
* The `capabilities` property is a required property when using the `remote` method.
*/
export interface WithRequestedCapabilities {
/**
* Defines the capabilities you want to run in your WebDriver session. Check out the
* documentation on [Capabilities](https://webdriver.io/docs/capabilities) for more details.
*
* @example
* ```js
* // WebDriver session
* const browser = remote({
* capabilities: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* }
* })
*
* // multiremote session
* const browser = remote({
* capabilities: {
* browserA: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* },
* browserB: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* })
* ```
*/
capabilities: RequestedStandaloneCapabilities;
}
/**
* The `capabilities` property is a required property when defining a testrunner configuration.
*/
export interface WithRequestedTestrunnerCapabilities {
/**
* Defines a set of capabilities you want to run in your WebDriver session. Check out the
* documentation on [Capabilities](https://webdriver.io/docs/capabilities) for more details.
*
* @example
* ```js
* // wdio.conf.js
* export const config = {
* // define parallel running capabilities
* capabilities: [{
* browserName: 'safari',
* platformName: 'MacOS 10.13',
* ...
* }, {
* browserName: 'microsoftedge',
* platformName: 'Windows 10',
* ...
* }, {
* // using alwaysMatch and firstMatch
* alwaysMatch: {
* browserName: 'chrome',
* browserVersion: 86
* // ...
* },
* firstMatch: [{
* browserName: 'chrome',
* // ...
* }]
* }
* ```
*/
capabilities: RequestedStandaloneCapabilities[];
}
/**
* The `capabilities` property is a required property when using the `remote` method to initiate a multiremote session.
*/
export interface WithRequestedMultiremoteCapabilities {
/**
* Defines the capabilities for each Multiremote client. Check out the
* documentation on [Capabilities](https://webdriver.io/docs/capabilities) for more details.
*
* @example
* ```
* // wdio.conf.js
* export const config = {
* // multiremote example
* capabilities: {
* browserA: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* },
* browserB: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* })
* ```
* // or with parallel multiremote sessions
* ```
* // wdio.conf.js
* export const config = {
* capabilities: [{
* browserA: {
* port: 4444,
* capabilities: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* }
* },
* browserB: {
* port: 4444,
* capabilities: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* }, {
* browserA: {
* port: 4444,
* capabilities: {
* browserName: 'chrome',
* browserVersion: 86
* platformName: 'Windows 10'
* }
* },
* browserB: {
* port: 4444,
* capabilities: {
* browserName: 'firefox',
* browserVersion: 74
* platformName: 'Mac OS X'
* }
* }
* }]
* })
* ```
*/
capabilities: RequestedMultiremoteCapabilities | RequestedMultiremoteCapabilities[];
}
export interface VendorExtensions extends EdgeCapabilities, AppiumCapabilities, WebdriverIOCapabilities, WebdriverIO.WDIOVSCodeServiceOptions, AppiumXCUITestCapabilities, AppiumAndroidCapabilities {
'appium:options'?: AppiumOptions;
'selenoid:options'?: SelenoidOptions;
'moon:options'?: MoonOptions;
'tb:options'?: TestingbotCapabilities;
'sauce:options'?: SauceLabsCapabilities;
'sauce:visual'?: SauceLabsVisualCapabilities;
'experitest:accessKey'?: string;
'LT:Options'?: LambdaTestCapabilities;
'lt:options'?: LambdaTestCapabilities;
'bstack:options'?: BrowserStackCapabilities;
'browserstack.local'?: boolean;
'browserstack.accessibility'?: boolean;
'browserstack.accessibilityOptions'?: {
[key: string]: any;
};
/**
* @private
*/
'browserstack.wdioService'?: string;
'browserstack.buildIdentifier'?: string;
'browserstack.localIdentifier'?: string;
'browserstack.testhubBuildUuid'?: string;
'browserstack.buildProductMap'?: {
[key: string]: boolean;
};
'goog:chromeOptions'?: ChromeOptions;
'moz:firefoxOptions'?: FirefoxOptions;
'moz:debuggerAddress'?: string | boolean;
'ms:edgeOptions'?: MicrosoftEdgeOptions;
'ms:edgeChromium'?: MicrosoftEdgeOptions;
'ms:experimental-webdriver'?: boolean;
'ms:waitForAppLaunch'?: string;
'safari.options'?: {
[name: string]: any;
};
/**
* Selenium 4.0 Specific
*/
'se:cdp'?: string;
}
export type AppiumOptions = RemoveAppiumPrefix<AppiumCapabilities & AppiumXCUITestCapabilities & AppiumAndroidCapabilities>;
export interface WebdriverIOCapabilities {
/**
* process id of driver attached to given session
*/
'wdio:driverPID'?: number;
'wdio:chromedriverOptions'?: WebdriverIO.ChromedriverOptions;
'wdio:safaridriverOptions'?: WebdriverIO.SafaridriverOptions;
'wdio:geckodriverOptions'?: WebdriverIO.GeckodriverOptions;
'wdio:edgedriverOptions'?: WebdriverIO.EdgedriverOptions;
/**
* Maximum number of total parallel running workers (per capability)
*/
'wdio:maxInstances'?: number;
/**
* Define specs for test execution. You can either specify a glob
* pattern to match multiple files at once or wrap a glob or set of
* paths into an array to run them within a single worker process.
*/
'wdio:specs'?: string[];
/**
* Exclude specs from test execution.
*/
'wdio:exclude'?: string[];
/**
* If flag is set to `true` WebdriverIO will not automatically opt-in
* to the WebDriver BiDi protocol. This is useful if you want to use
* the WebDriver protocol only.
*/
'wdio:enforceWebDriverClassic'?: boolean;
}
export interface ChromeOptions {
/**
* List of command-line arguments to use when starting Chrome. Arguments with an
* associated value should be separated by a '=' sign (e.g., `['start-maximized', 'user-data-dir=/tmp/temp_profile']`).
* See here for a list of Chrome arguments.
*/
args?: string[];
/**
* Path to the Chrome executable to use (on Mac OS X, this should be the actual binary,
* not just the app. e.g., '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome')
*/
binary?: string;
/**
* A list of Chrome extensions to install on startup. Each item in the list should
* be a base-64 encoded packed Chrome extension (.crx)
*/
extensions?: string[];
/**
* A dictionary with each entry consisting of the name of the preference and its value.
* These preferences are applied to the Local State file in the user data folder.
*/
localState?: {
[name: string]: any;
};
/**
* If false, Chrome will be quit when ChromeDriver is killed, regardless of whether
* the session is quit. If true, Chrome will only be quit if the session is quit
* (or closed). Note, if true, and the session is not quit, ChromeDriver cannot clean
* up the temporary user data directory that the running Chrome instance is using.
*/
detach?: boolean;
/**
* An address of a Chrome debugger server to connect to, in the form of `<hostname/ip:port>`,
* e.g. '127.0.0.1:38947'
*/
debuggerAddress?: string;
/**
* List of Chrome command line switches to exclude that ChromeDriver by default passes
* when starting Chrome. Do not prefix switches with --.
*/
excludeSwitches?: string[];
/**
* Directory to store Chrome minidumps . (Supported only on Linux.)
*/
minidumpPath?: string;
/**
* A dictionary with either a value for "deviceName", or values for "deviceMetrics" and
* "userAgent". Refer to Mobile Emulation for more information.
*/
mobileEmulation?: {
userAgent?: string;
deviceName?: string;
deviceMetrics?: {
width?: number;
height?: number;
pixelRatio?: number;
touch?: boolean;
};
};
/**
* An optional dictionary that specifies performance logging preferences. See
* [Chromedriver docs](http://chromedriver.chromium.org/capabilities) for
* more information.
*/
perfLoggingPrefs?: {
/**
* Whether or not to collect events from Network domain.
* @default true
*/
enableNetwork?: boolean;
/**
* Whether or not to collect events from Page domain.
* @default true
*/
enablePage?: boolean;
/**
* A comma-separated string of Chrome tracing categories for which trace events
* should be collected. An unspecified or empty string disables tracing.
* @default ''
*/
tracingCategories?: string;
/**
* The requested number of milliseconds between DevTools trace buffer
* usage events. For example, if 1000, then once per second, DevTools
* will report how full the trace buffer is. If a report indicates the
* buffer usage is 100%, a warning will be issued.
* @default 1000
*/
bufferUsageReportingInterval?: number;
};
/**
* A dictionary with each entry consisting of the name of the preference and its value.
* These preferences are only applied to the user profile in use. See the 'Preferences'
* file in Chrome's user data directory for examples.
*/
prefs?: Record<string, JSONLike>;
/**
* A list of window types that will appear in the list of window handles. For access
* to <webview> elements, include "webview" in this list.
*/
windowTypes?: string[];
}
/**
* Chromium Edge
*/
interface MicrosoftEdgeOptions extends ChromeOptions {
}
export type FirefoxLogLevels = 'trace' | 'debug' | 'config' | 'info' | 'warn' | 'error' | 'fatal';
export interface FirefoxLogObject {
level: FirefoxLogLevels;
}
export interface FirefoxOptions {
debuggerAddress?: string;
binary?: string;
args?: string[];
profile?: string;
log?: FirefoxLogObject;
prefs?: {
[name: string]: string[] | string | number | boolean;
};
}
export interface SelenoidOptions {
enableVNC?: boolean;
screenResolution?: string;
enableVideo?: boolean;
videoName?: string;
videoScreenSize?: string;
videoFrameRate?: number;
videoCodec?: string;
enableLog?: boolean;
logName?: string;
name?: string;
sessionTimeout?: string;
timeZone?: string;
env?: string[];
applicationContainers?: string[];
hostsEntries?: string[];
dnsServers?: string[];
additionalNetworks?: string[];
labels?: Map<string, string>;
skin?: string;
s3KeyPattern?: string;
}
export type MoonMobileDeviceOrientation = 'portrait' | 'vertical' | 'landscape' | 'horizontal';
export interface MoonOptions extends SelenoidOptions {
mobileDevice?: {
deviceName: string;
orientation: MoonMobileDeviceOrientation;
};
logLevel?: string;
}
export interface EdgeCapabilities {
'ms:inPrivate'?: boolean;
'ms:extensionPaths'?: string[];
'ms:startPage'?: string;
}
/**
* Appium General W3C Capabilities
*
* @see https://appium.io/docs/en/latest/guides/caps/
*/
export interface AppiumCapabilities {
/**
* Which automation engine to use.
*
* Acceptable values:
* + 'Appium' (default)
* + 'UiAutomator2' for Android
* + 'Espresso' for Android
* + 'UiAutomator1' for Android
* + 'XCUITest' or 'Instruments' for iOS
* + 'YouiEngine' for application built with You.i Engine
*/
'appium:automationName'?: string;
/**
* Which mobile OS platform to use.
*
* Acceptable values:
* + 'iOS'
* + 'Android'
* + 'FirefoxOS'
*/
'appium:platformName'?: string;
/**
* Expected mobile OS version, eg: '7.1', '4.4' etc.
*/
'appium:platformVersion'?: string;
/**
* The kind of mobile device or emulator to use, for each platform, it accept different kind of values.
*
* ### For iOS, it could be:
*
* + Simulator name, eg: 'iPhone Simulator', 'iPad Simulator', 'iPhone Retina 4-inch'.
* + Instruments name, which comes from 'instruments -s devices' command.
* + xctrace device name, which comes from 'xcrun xctrace list devices' command. (since Xcode 12)
*
* ### For Android, this capability is currently ignored, though it remains required.
* Note: This document is written with appium 1.22.1 release, this behavior may changed later.
*/
'appium:deviceName'?: string;
/**
* The absolute local path or remote http URL to a .ipa file (IOS), .app folder (IOS Simulator), .apk file (Android)
* or [.apks file (Android App Bundle)](https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/android-appbundle.md),
* or a .zip file containing one of these.
*
* Appium will attempt to install this app binary on the appropriate device first.
* Note that this capability is not required for Android if you specify appPackage and appActivity capabilities.
* UiAutomator2 and XCUITest allow to start the session without app or appPackage.
*/
'appium:app'?: string;
/**
* The id of the app to be tested. eg: 'com.android.chrome'.
*/
'appium:appPackage'?: string;
'appium:appWaitActivity'?: string;
'appium:newCommandTimeout'?: number;
'appium:language'?: string;
'appium:locale'?: string;
'appium:animationCoolOffTimeout'?: number;
/**
* iOS Unique Device Identifier
*/
'appium:udid'?: string;
'appium:orientation'?: string;
'appium:autoWebview'?: boolean;
'appium:noReset'?: boolean;
'appium:fullReset'?: boolean;
'appium:eventTimings'?: boolean;
'appium:enablePerformanceLogging'?: boolean;
'appium:printPageSourceOnFindFailure'?: boolean;
'appium:nativeWebTap'?: boolean;
/**
* Users as directConnect feature by the server
* https://appiumpro.com/editions/86-connecting-directly-to-appium-hosts-in-distributed-environments
*/
'appium:directConnectProtocol'?: string;
'appium:directConnectHost'?: string;
'appium:directConnectPort'?: number;
'appium:directConnectPath'?: string;
/**
* Windows-specific capability: Please see https://github.com/appium/appium-windows-driver#usage
* This is a hexadecimal handle of an existing application top level window to attach to. Either this
* capability or 'appium:app' must be provided on session startup.
*/
'appium:appTopLevelWindow'?: string;
/**
* https://appium.io/docs/en/latest/guides/settings/#initializing-settings-via-capabilities
*/
'appium:settings'?: Record<string, any>;
}
/**
* Appium Android Only Capabilities
*
* @see https://github.com/appium/appium-uiautomator2-driver#capabilities
*/
export interface AppiumAndroidCapabilities {
'appium:appiumVersion'?: string;
'appium:appActivity'?: string;
'appium:appPackage'?: string;
'appium:appWaitActivity'?: string;
'appium:appWaitPackage'?: string;
'appium:appWaitDuration'?: number;
'appium:deviceReadyTimeout'?: number;
'appium:allowTestPackages'?: boolean;
'appium:androidCoverage'?: string;
'appium:androidCoverageEndIntent'?: string;
'appium:androidDeviceReadyTimeout'?: number;
'appium:androidInstallTimeout'?: number;
'appium:androidInstallPath'?: string;
'appium:adbPort'?: number;
'appium:systemPort'?: number;
'appium:remoteAdbHost'?: string;
'appium:androidDeviceSocket'?: string;
'appium:avd'?: string;
'appium:avdLaunchTimeout'?: number;
'appium:avdReadyTimeout'?: number;
'appium:avdArgs'?: string;
'appium:useKeystore'?: boolean;
'appium:keystorePath'?: string;
'appium:keystorePassword'?: string;
'appium:keyAlias'?: string;
'appium:keyPassword'?: string;
'appium:chromedriverExecutable'?: string;
'appium:chromedriverArgs'?: string[];
'appium:chromedriverExecutableDir'?: string;
'appium:chromedriverChromeMappingFile'?: string;
'appium:chromedriverUseSystemExecutable'?: boolean;
'appium:autoWebviewTimeout'?: number;
'appium:chromedriverPort'?: number;
'appium:chromedriverPorts'?: (number | number[])[];
'appium:intentAction'?: string;
'appium:intentCategory'?: string;
'appium:intentFlags'?: string;
'appium:optionalIntentArguments'?: string;
'appium:dontStopAppOnReset'?: boolean;
'appium:unicodeKeyboard'?: boolean;
'appium:resetKeyboard'?: boolean;
'appium:noSign'?: boolean;
'appium:ignoreUnimportantViews'?: boolean;
'appium:disableAndroidWatchers'?: boolean;
'appium:recreateChromeDriverSessions'?: boolean;
'appium:nativeWebScreenshot'?: boolean;
'appium:androidScreenshotPath'?: string;
'appium:autoGrantPermissions'?: boolean;
'appium:networkSpeed'?: string;
'appium:gpsEnabled'?: boolean;
'appium:isHeadless'?: boolean;
'appium:adbExecTimeout'?: number;
'appium:localeScript'?: string;
'appium:skipDeviceInitialization'?: boolean;
'appium:chromedriverDisableBuildCheck'?: boolean;
'appium:skipUnlock'?: boolean;
'appium:unlockType'?: string;
'appium:unlockKey'?: string;
'appium:autoLaunch'?: boolean;
'appium:skipLogcatCapture'?: boolean;
'appium:uninstallOtherPackages'?: string;
'appium:disableWindowAnimation'?: boolean;
'appium:otherApps'?: string | string[];
'appium:uiautomator2ServerLaunchTimeout'?: number;
'appium:uiautomator2ServerInstallTimeout'?: number;
'appium:skipServerInstallation'?: boolean;
'appium:espressoServerLaunchTimeout'?: number;
'appium:disableSuppressAccessibilityService'?: boolean;
'appium:hideKeyboard'?: boolean;
'appium:autoWebviewName'?: string;
'appium:uiautomator2ServerReadTimeout'?: number;
'appium:appWaitForLaunch'?: boolean;
'appium:remoteAppsCacheLimit'?: number;
'appium:enforceAppInstall'?: boolean;
'appium:clearDeviceLogsOnStart'?: boolean;
'appium:buildToolsVersion'?: string;
'appium:suppressKillServer'?: boolean;
'appium:ignoreHiddenApiPolicyError'?: boolean;
'appium:mockLocationApp'?: string;
'appium:logcatFormat'?: string;
'appium:logcatFilterSpecs'?: string;
'appium:allowDelayAdb'?: boolean;
'appium:avdEnv'?: {
[key: string]: string;
};
'appium:unlockStrategy'?: string;
'appium:unlockSuccessTimeout'?: number;
'appium:webviewDevtoolsPort'?: number;
'appium:ensureWebviewsHavePages'?: boolean;
'appium:enableWebviewDetailsCollection'?: boolean;
'appium:extractChromeAndroidPackageFromContextName'?: boolean;
'appium:showChromedriverLog'?: boolean;
'appium:chromeOptions'?: {
[key: string]: any;
};
'appium:chromeLoggingPrefs'?: {
[key: string]: any;
};
'appium:userProfile'?: number;
}
/**
* Appium xcuitest Capabilities
*
* @see https://appium.github.io/appium-xcuitest-driver/latest/reference/capabilities/
*/
export interface AppiumXCUITestCapabilities {
'appium:platformName'?: string;
'appium:browserName'?: string;
'appium:app'?: string;
'appium:calendarFormat'?: string;
'appium:bundleId'?: string;
'appium:launchTimeout'?: number;
'appium:udid'?: string;
'appium:appName'?: string;
'appium:waitForAppScript'?: string;
'appium:sendKeyStrategy'?: string;
'appium:screenshotWaitTimeout'?: number;
'appium:interKeyDelay'?: number;
'appium:nativeInstrumentsLib'?: boolean;
'appium:autoAcceptAlerts'?: boolean;
'appium:autoDismissAlerts'?: boolean;
'appium:nativeWebTap'?: boolean;
'appium:safariInitialUrl'?: string;
'appium:safariAllowPopups'?: boolean;
'appium:safariIgnoreFraudWarning'?: boolean;
'appium:safariOpenLinksInBackground'?: boolean;
'appium:safariShowFullResponse'?: boolean;
'appium:keepKeyChains'?: boolean;
'appium:locationServicesEnabled'?: boolean;
'appium:locationServicesAuthorized'?: boolean;
'appium:resetLocationService'?: boolean;
'appium:localizableStringsDir'?: string;
'appium:processArguments'?: string | AppiumXCUIProcessArguments;
'appium:showIOSLog'?: boolean;
'appium:webviewConnectRetries'?: number;
'appium:clearSystemFiles'?: boolean;
'appium:customSSLCert'?: string;
'appium:webkitResponseTimeout'?: number;
'appium:webkitDebugProxyPort'?: number;
'appium:remoteDebugProxy'?: string;
'appium:enablePerformanceLogging'?: boolean;
'appium:enableAsyncExecuteFromHttps'?: boolean;
'appium:fullContextList'?: boolean;
'appium:ignoreAboutBlankUrl'?: boolean;
'appium:skipLogCapture'?: boolean;
'appium:deviceName'?: string;
'appium:showXcodeLog'?: boolean;
'appium:wdaLocalPort'?: number;
'appium:wdaBaseUrl'?: string;
'appium:iosInstallPause'?: number;
'appium:xcodeConfigFile'?: string;
'appium:xcodeOrgId'?: string;
'appium:xcodeSigningId'?: string;
'appium:keychainPath'?: string;
'appium:keychainPassword'?: string;
'appium:bootstrapPath'?: string;
'appium:agentPath'?: string;
'appium:tapWithShortPressDuration'?: number;
'appium:scaleFactor'?: string;
'appium:usePrebuiltWDA'?: boolean;
'appium:usePreinstalledWDA'?: boolean;
'appium:webDriverAgentUrl'?: string;
'appium:derivedDataPath'?: string;
'appium:launchWithIDB'?: boolean;
'appium:useNewWDA'?: boolean;
'appium:wdaLaunchTimeout'?: number;
'appium:wdaConnectionTimeout'?: number;
'appium:updatedWDABundleId'?: string;
'appium:resetOnSessionStartOnly'?: boolean;
'appium:commandTimeouts'?: string | AppiumXCUICommandTimeouts;
'appium:wdaStartupRetries'?: number;
'appium:wdaStartupRetryInterval'?: number;
'appium:prebuildWDA'?: boolean;
'appium:connectHardwareKeyboard'?: boolean;
'appium:forceTurnOnSoftwareKeyboardSimulator'?: boolean;
'appium:simulatorPasteboardAutomaticSync'?: string;
'appium:simulatorDevicesSetPath'?: string;
'appium:calendarAccessAuthorized'?: boolean;
'appium:useSimpleBuildTest'?: boolean;
'appium:waitForQuiescence'?: boolean;
'appium:maxTypingFrequency'?: number;
'appium:nativeTyping'?: boolean;
'appium:simpleIsVisibleCheck'?: boolean;
'appium:shouldUseSingletonTestManager'?: boolean;
'appium:isHeadless'?: boolean;
'appium:autoGrantPermissions'?: boolean;
'appium:useXctestrunFile'?: boolean;
'appium:absoluteWebLocations'?: boolean;
'appium:simulatorWindowCenter'?: string;
'appium:simulatorStartupTimeout'?: number;
'appium:simulatorTracePointer'?: boolean;
'appium:useJSONSource'?: boolean;
'appium:enforceFreshSimulatorCreation'?: boolean;
'appium:shutdownOtherSimulators'?: boolean;
'appium:keychainsExcludePatterns'?: string;
'appium:showSafariConsoleLog'?: boolean;
'appium:showSafariNetworkLog'?: boolean;
'appium:safariGarbageCollect'?: boolean;
'appium:safariGlobalPreferences'?: AppiumXCUISafariGlobalPreferences;
'appium:safariLogAllCommunication'?: boolean;
'appium:safariLogAllCommunicationHexDump'?: boolean;
'appium:safariSocketChunkSize'?: number;
'appium:mjpegServerPort'?: number;
'appium:reduceMotion'?: boolean;
'appium:mjpegScreenshotUrl'?: string;
'appium:permissions'?: string;
'appium:screenshotQuality'?: number;
'appium:wdaEventloopIdleDelay'?: number;
'appium:otherApps'?: string | string[];
'appium:includeSafariInWebviews'?: boolean;
'appium:additionalWebviewBundleIds'?: Array<string>;
'appium:webviewConnectTimeout'?: number;
'appium:iosSimulatorLogsPredicate'?: string;
'appium:appPushTimeout'?: number;
'appium:nativeWebTapStrict'?: boolean;
'appium:safariWebInspectorMaxFrameLength'?: number;
'appium:allowProvisioningDeviceRegistration'?: boolean;
'appium:waitForIdleTimeout'?: number;
'appium:resultBundlePath'?: string;
'appium:resultBundleVersion'?: number;
'appium:safariIgnoreWebHostnames'?: string;
'appium:includeDeviceCapsToSessionInfo'?: boolean;
'appium:disableAutomaticScreenshots'?: boolean;
'appium:shouldTerminateApp'?: boolean;
'appium:forceAppLaunch'?: boolean;
'appium:useNativeCachingStrategy'?: boolean;
'appium:appInstallStrategy'?: string;
/**
* Windows Application Driver capabilities
*/
'appium:appArguments'?: string;
}
export interface AppiumXCUISafariGlobalPreferences {
[key: string]: any;
}
export interface AppiumXCUIProcessArguments {
args?: Array<string>;
env?: {
[key: string]: any;
};
}
export interface AppiumXCUICommandTimeouts {
[key: string]: any;
}
/**
* see also https://docs.saucelabs.com/dev/test-configuration-options
*/
export interface SauceLabsCapabilities {
/**
* Desktop Browser Capabilities: Sauce-Specific – Optional
* see https://docs.saucelabs.com/dev/test-configuration-options/#desktop-browser-capabilities-sauce-specific--optional
*/
/**
* Allows you to specify the ChromeDriver version you want to use for your tests.
* The default version of ChromeDriver when no value is specified depends on the version of Chrome used.
* As of Chrome 73, the major version of the driver and the browser must match.
*
* Desktop Virtual Devices only.
*
* For a list of ChromeDriver versions, see chromedriver versions list.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#chromedriverversion
* @see https://chromedriver.storage.googleapis.com/index.html
*/
chromedriverVersion?: string;
/**
* Specifies the Microsoft Edge driver version you want to use for your tests.
*
* Desktop Virtual Devices only.
*
* For a list of edgedriver versions, see the Microsoft Edge Driver website.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#edgedriverversion
* @see https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
*/
edgedriverVersion?: string;
/**
* Specifies the Firefox GeckoDriver version.
* The default geckodriver version varies based on the version of Firefox specified.
*
* Desktop Virtual Devices only.
*
* For a list of geckodriver versions and the Firefox versions they support, see geckodriver Supported Platforms.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#geckodriverversion
* @see https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
*/
geckodriverVersion?: string;
/**
* Specifies the Internet Explorer Driver version. If no version is specified, it defaults to 2.53.1.
*
* Desktop Virtual Devices only.
*
* For a list of IE Driver versions, see Internet Explorer Driver Server CHANGELOG.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#iedriverversion
* @see https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/cpp/iedriverserver/CHANGELOG
*/
iedriverVersion?: string;
/**
* Specifies the Selenium version you want to use for your test.
* Sauce Labs will default to different versions, depending on the age of the browser and platform,
* and whether or not you're initializing a session with valid W3C syntax.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#seleniumversion
*/
seleniumVersion?: string;
/**
* Allows the browser to communicate directly with servers without going through a proxy.
* By default, Sauce routes traffic from Internet Explorer and Safari through an HTTP proxy server
* so that HTTPS connections with self-signed certificates will work.
*
* The proxy server can cause problems for some users, and this setting allows you to avoid it.
*
* Any test run with a Sauce Connect tunnel has to use the proxy and this flag will be ignored.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#avoidproxy
*/
avoidProxy?: boolean;
/**
* Enables Extended Debugging features. This applies to Firefox and Chrome only.
* It records HAR files and console logs for both of these browsers.
* In Chrome, it also enables network interception, network and cpu throttling as well as access to network logs
* during the session. It is required to be true for capturePerformance. The default value is false.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#extendeddebugging
* @see https://docs.saucelabs.com/insights/debug/
*/
extendedDebugging?: boolean;
/**
* Enables Performance Capture feature.
* Sauce Performance Testing can be enabled by setting both extendedDebugging and capturePerformance to true.
* Default value is false.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#captureperformance
* @see https://docs.saucelabs.com/performance/
*/
capturePerformance?: boolean;
/**
* Specifies the screen resolution to be used during your test session.
* Default screen resolution for Sauce tests is 1024x768.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#screenresolution
*/
screenResolution?: string;
/**
* Sets command timeout in seconds.
* As a safety measure to prevent Selenium crashes from making your tests run indefinitely,
* we limit how long Selenium can take to run a command in our browsers.
* This is set to 300 seconds by default. The maximum command timeout value allowed is 600 seconds.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#commandtimeout
*/
commandTimeout?: number;
/**
* Sets idle test timeout in seconds.
* As a safety measure to prevent tests from running too long after something has gone wrong,
* we limit how long a browser can wait for a test to send a new command.
* This is set to 90 seconds by default and limited to a maximum value of 1000 seconds.
*
* Desktop Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#idletimeout
*/
idleTimeout?: number;
/**
* Mobile App Appium Capabilities: Sauce-Specific – Optional
* see https://docs.saucelabs.com/dev/test-configuration-options/#mobile-app-appium-capabilities-sauce-specific--optional
*/
/**
* Specifies the Appium driver version you want to use.
* For most use cases, setting the appiumVersion is unnecessary because Sauce Labs defaults to the version that supports the broadest number of device combinations.
* Sauce Labs advises against setting this property unless you need to test a particular Appium feature or patch.
*
* Virtual and Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#appiumversion
*/
appiumVersion?: string;
/**
* Specifies the orientation of the virtual skin and screen during the test.
*
* Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#deviceorientation
*/
deviceOrientation?: 'portrait' | 'landscape';
/**
* If your app creates an extra log then you can use the customLogFiles to store those additional logs in the "Logs" tab of the executed automated session.
* It is created in the form of a list of search filters that enumerate after an app test to locate text files to upload as logs.
* Files are uploaded with the .log extension appended. The search paths are rooted at the application under test.
*
* Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#customlogfiles
*/
customLogFiles?: string[];
/**
* By default, our emulator uses software rendering to handle graphics for maximum compatibility.
* This involves the CPU calculating how everything looks on your app's screen.
* However, this could lead to an emulator crash when testing apps with intricate or heavy graphical elements.
* To mitigate this, use the hardware rendering option by specifying "android.gpu.mode"="hardware" in your test capabilities.
*
* Android Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#androidgpumode
*/
'android.gpu.mode'?: 'software' | 'hardware';
/**
* Android allows apps to use the full screen, hiding the status bar and navigation bar.
* This is called "immersive mode". When you run an Android test, the device will show a popup asking if you want to allow the app to use immersive mode.
* This popup can interfere with your test, and by default we disable it.
* If you want to enable it, set disableImmersiveModePopUp to false.
*
* Android Virtual Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#disableimmersivemodepopup
*/
disableImmersiveModePopUp?: boolean;
/**
* Sets up the device pin code for the automated test session.
* This capability sets your device in the state required for your application to launch successfully.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#disableimmersivemodepopup
*/
setupDeviceLock?: boolean;
/**
* Use this capability to select only tablet devices for testing.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#tabletonly
*/
tabletOnly?: boolean;
/**
* Use this capability to select only phone devices for testing.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#phoneonly
*/
phoneOnly?: boolean;
/**
* Use this capability to select only private devices for testing.
*
* Private Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#privatedevicesonly
*/
privateDevicesOnly?: boolean;
/**
* Use this capability to select only public devices for testing.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#publicdevicesonly
*/
publicDevicesOnly?: boolean;
/**
* Use this capability to allocate only devices connected to a carrier network.
*
* Private Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#carrierconnectivityonly
*/
carrierConnectivityOnly?: boolean;
/**
* Keeps the device allocated to you between test sessions and bypasses the device cleaning process and session exit that occurs by default after each test completes.
* Normally, you'd need to start over and reopen another device.
* You'll need to launch your next test within 10 seconds of your previous test ending
* to ensure that the same device will be allocated for the test (not cleaned or reset).
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#cacheid
*/
cacheId?: string;
/**
* Controls Sauce Labs default resigning (iOS) or instrumentation (Android) of mobile apps installed on our devices.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#resigningenabled
*/
resigningEnabled?: boolean;
/**
* Enables the camera image injection feature. resigningEnabled needs to be enabled if this is set to true.
*
* Real Devices only.
* @see https://docs.saucelabs.com/mobile-apps/features/camera-image-injection/
* @see https://docs.saucelabs.com/dev/test-configuration-options/#saucelabsimageinjectionenabled
*/
sauceLabsImageInjectionEnabled?: boolean;
/**
* Bypasses the restriction on taking screenshots for secure screens (i.e., secure text entry). resigningEnabled needs to be enabled if this is set to true.
*
* Android Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#saucelabsbypassscreenshotrestriction
*/
sauceLabsBypassScreenshotRestriction?: boolean;
/**
* Enables the interception of biometric input, allowing the test to simulate Touch ID interactions (not a Sauce Labs-specific capability).
* resigningEnabled needs to be enabled if this is set to true.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#allowtouchidenroll
*/
allowTouchIdEnroll?: boolean;
/**
* Enables audio recording in your iOS and Android native mobile app tests.
* The audio will be part of the Test Results page video file, which you can play back and download in our built-in media player.
* The default value is false.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#audiocapture
*/
audioCapture?: boolean;
/**
* Enables mobile app instrumentation (Android or iOS) and recording of HTTP/HTTPS network traffic for debugging purposes.
* API calls are collected into a HAR file, which you can view and download from your Test Results > Network tab console.
* The default value is false.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#networkcapture
*/
networkCapture?: boolean;
/**
* Enables the use of the app's private app container directory instead of the shared app group container directory.
* For testing on the Real Device Cloud, the app gets resigned, which is why the shared directory is not accessible.
*
* iOS Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#groupfolderredirectenabled
*/
groupFolderRedirectEnabled?: boolean;
/**
* Use this capability to enable animations for Android real devices by setting it to true. By default, animations are disabled.
*
* Android Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#enableanimations
*/
enableAnimations?: boolean;
/**
* Delays system alerts, such as alerts asking for permission to access the camera, to prevent app crashes at startup.
* resigningEnabled needs to be enabled if this is set to true.
*
* iOS Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#systemalertsdelayenabled
*/
systemAlertsDelayEnabled?: boolean;
/**
* Specify the amount of time (in milliseconds) that the test should be allowed to find and assign an available device before the test will fail.
* The default value is 900000 milliseconds (15 minutes) and the max is 1800000 milliseconds (30 minutes).
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#sessioncreationtimeout
*/
sessionCreationTimeout?: boolean;
/**
* Specify the amount of automatic retries that Sauce Labs will execute to find and assign an available device before the test will fail.
* The default value is 1 and the max is 3.
*
* Real Devices only.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#sessioncreationretry
*/
sessionCreationRetry?: number;
/**
* Desktop and Mobile Capabilities: Sauce-Specific – Optional
* see https://docs.saucelabs.com/dev/test-configuration-options/#desktop-and-mobile-capabilities-sauce-specific--optional
*/
/**
* Used to record test names for jobs and make it easier to find individual tests.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#name
*/
name?: string;
/**
* Used to associate jobs with a build number or app version, which is then displayed
* on both the Dashboard and Archives view
*
* @see https://docs.saucelabs.com/dev/test-configuration-options/#build
* @example `build-1234`
*/
build?: string | number;
/**
* User-defined tags for grouping and filtering jobs in the Dashboard and Archives view.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#tags
* @example
* ```
* ["tag1", "tag2", "tag3"]
* ```
*/
tags?: string[];
/**
* Sets your Sauce Labs username for a test.
*
* You can either set "username" in capabilities or specify it in the Sauce URL as Basic Authentication. For Visual Tests), this must be set in capabilities.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#username
*/
username?: string;
/**
* Sets your Sauce Labs access key for the test.
*
* You can either set "accessKey" in capabilities or specify it in the Sauce URL as Basic Authentication. For Visual Tests, this must be set in capabilities.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#accesskey
*/
accessKey?: string;
/**
* User-defined custom data that will accept any valid JSON object, limited to 64KB in size.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#custom-data
* @example
* ```
* {
* "release": "1.0",
* "commit": "0k392a9dkjr",
* "staging": true,
* "execution_number": 5,
* "server": "test.customer.com"
* }
* ```
*/
'custom-data'?: any;
/**
* We support several test/job result visibility levels, which control who can view the test details.
* The visibility level for a test can be set manually from the test results page, but also programmatically when starting a test or with our REST API.
* For more information about sharing test results, see the topics under Sharing the Results of Sauce Labs Tests.
*
* Desktop and Virtual Devices only.
*
* @see https://docs.saucelabs.com/test-results/sharing-test-results/
*/
public?: 'public' | 'public restricted' | 'share' | 'team' | 'private';
/**
* Specify a Sauce Connect tunnel to establish connectivity with Sauce Labs for your test.
* Tunnels allow you to test an app that is behind a firewall or on your local machine by providing a secure connection to the Sauce Labs platform.
* @see https://docs.saucelabs.com/secure-connections/sauce-connect/setup-configuration/basic-setup/
* @see https://docs.saucelabs.com/dev/test-configuration-options/#tunnelname
*/
tunnelName?: string;
/**
* Specify a Sauce Connect tunnel name to establish connectivity with a Sauce Labs test platform. This is an alias for tunnelName.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#tunnelidentifier
* @deprecated
*/
tunnelIdentifier?: string;
/**
* If the tunnelName you've specified to establish connectivity with a Sauce Labs test platform is a shared tunnel,
* and you are not the user who created the tunnel, you must identify the Sauce Labs user who did create the tunnel in order to use it for your test.
* @see https://docs.saucelabs.com/secure-connections/sauce-connect/setup-configuration/basic-setup/#using-tunnel-names
* @see https://docs.saucelabs.com/dev/test-configuration-options/#tunnelowner
*/
tunnelOwner?: string;
/**
* If the tunnelName (or tunnelIdentifier) you've specified to establish connectivity with a Sauce Labs test platform is a shared tunnel,
* and you are not the user who created the tunnel, you must identify the Sauce Labs user who did create the tunnel in order to use it for your test.
* This is an alias for tunnelOwner.
* @see https://docs.saucelabs.com/dev/test-configuration-options/#parenttunnel
* @deprecated
*/
parentTunnel?: string;
/**
* Use this to disable video recording. By default, Sauce Labs records a video of every test you run.
* Disabling video recording can be useful for debugging failing tests as well