forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCapabilities.ts
More file actions
2070 lines (1943 loc) · 71.9 KB
/
Capabilities.ts
File metadata and controls
2070 lines (1943 loc) · 71.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable @typescript-eslint/no-explicit-any */
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 to remove 'appium:' prefix from property keys
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
}
export interface DesiredCapabilities extends WebdriverIO.Capabilities, SauceLabsCapabilities, SauceLabsVisualCapabilities,
TestingbotCapabilities, SeleniumRCCapabilities, GeckodriverCapabilities, IECapabilities,
AppiumAndroidCapabilities, AppiumCapabilities, VendorExtensions, GridCapabilities,
ChromeCapabilities, BrowserStackCapabilities, AppiumXCUITestCapabilities, LambdaTestCapabilities {
// Read-only capabilities
cssSelectorsEnabled?: boolean
handlesAlerts?: boolean
version?: string
platform?: string
public?: any
loggingPrefs?: {
browser?: LoggingPreferences
driver?: LoggingPreferences
server?: LoggingPreferences
client?: LoggingPreferences
}
// Read-write capabilities
javascriptEnabled?: boolean
databaseEnabled?: boolean
locationContextEnabled?: boolean
applicationCacheEnabled?: boolean
browserConnectionEnabled?: boolean
webStorageEnabled?: boolean
acceptSslCerts?: boolean
rotatable?: boolean
nativeEvents?: boolean
unexpectedAlertBehaviour?: string
elementScrollBehavior?: number
// RemoteWebDriver specific
'webdriver.remote.sessionid'?: string
'webdriver.remote.quietExceptions'?: boolean
// Selenese-Backed-WebDriver specific
'selenium.server.url'?: string
// webdriverio specific
specs?: string[]
exclude?: string[]
excludeDriverLogs?: string[]
}
/**
* 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, WebdriverIO.WDIODevtoolsOptions, WebdriverIOCapabilities,
WebdriverIO.WDIOVSCodeServiceOptions, AppiumXCUITestCapabilities, AppiumAndroidCapabilities {
// Appium Options
'appium:options'?: AppiumOptions
// Aerokube Selenoid specific
'selenoid:options'?: SelenoidOptions
// Aerokube Moon specific
'moon:options'?: MoonOptions
// Testingbot w3c specific
'tb:options'?: TestingbotCapabilities
// Sauce Labs w3c specific
'sauce:options'?: SauceLabsCapabilities
// Sauce Labs Visual
'sauce:visual'?: SauceLabsVisualCapabilities
// Experitest Access Keys
'experitest:accessKey'?: string
//LambdaTest w3c specific
'LT:Options'?: LambdaTestCapabilities
// LT w3c specific as "officially" documented
'lt:options'?: LambdaTestCapabilities
// Browserstack w3c specific
'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
// This capability is a boolean when send as part of the capabilities to Geckodriver
// and is being returns as string (e.g. "<host>:<port>") when session capabilities
// are returned from the driver
// see https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html#moz-debuggeraddress
'moz:debuggerAddress'?: string | boolean
'ms:edgeOptions'?: MicrosoftEdgeOptions
'ms:edgeChromium'?: MicrosoftEdgeOptions
// Windows Application Driver
'ms:experimental-webdriver'?: boolean
'ms:waitForAppLaunch'?: string
// Safari specific
'safari.options'?: {
[name: string]: any
}
/**
* Selenium 4.0 Specific
*/
'se:cdp'?: string
/**
* Selenoid custom
*/
'se:wsdriver'?: string
/**
* Selenoid custom
*/
'se:wsdriverVersion'?: 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
}
}
// Aerokube Selenoid specific
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
}
// Aerokube Moon specific
export type MoonMobileDeviceOrientation =
'portrait' | 'vertical' | 'landscape' | 'horizontal'
export interface MoonOptions extends SelenoidOptions {
mobileDevice?: {
deviceName: string
orientation: MoonMobileDeviceOrientation
}
logLevel?: string
}
// Edge specific
export interface EdgeCapabilities {
'ms:inPrivate'?: boolean
'ms:extensionPaths'?: string[]
'ms:startPage'?: string
}
/**
* Appium General W3C Capabilities
*
* @see https://appium.github.io/appium.io/docs/en/writing-running-appium/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://appium.github.io/appium.io/docs/en/writing-running-appium/android/android-appbundle/index.html),
* 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/2.11/guides/settings/#initializing-settings-via-capabilities
*/
'appium:settings'?: Record<string, any>
}
/**
* Appium Android Only Capabilities
*
* @see https://appium.github.io/appium.io/docs/en/writing-running-appium/caps/#android-only
*/
export interface AppiumAndroidCapabilities {
appiumVersion?: string;
appActivity?: string;
appPackage?: string;
appWaitActivity?: string;
appWaitPackage?: string;
appWaitDuration?: number;
deviceReadyTimeout?: number;
allowTestPackages?: boolean;
androidCoverage?: string;
androidCoverageEndIntent?: string;
androidDeviceReadyTimeout?: number;
androidInstallTimeout?: number;
androidInstallPath?: string;
adbPort?: number;
systemPort?: number;
remoteAdbHost?: string;
androidDeviceSocket?: string;
avd?: string;
avdLaunchTimeout?: number;
avdReadyTimeout?: number;
avdArgs?: string;
useKeystore?: boolean;
keystorePath?: string;
keystorePassword?: string;
keyAlias?: string;
keyPassword?: string;
chromedriverExecutable?: string;
chromedriverArgs?: string[];
chromedriverExecutableDir?: string;
chromedriverChromeMappingFile?: string;
chromedriverUseSystemExecutable?: boolean;
autoWebviewTimeout?: number;
chromedriverPort?: number;
chromedriverPorts?: (number | number[])[]
intentAction?: string;
intentCategory?: string;
intentFlags?: string;
optionalIntentArguments?: string;
dontStopAppOnReset?: boolean;
unicodeKeyboard?: boolean;
resetKeyboard?: boolean;
noSign?: boolean;
ignoreUnimportantViews?: boolean;
disableAndroidWatchers?: boolean;
recreateChromeDriverSessions?: boolean;
nativeWebScreenshot?: boolean;
androidScreenshotPath?: string;
autoGrantPermissions?: boolean;
networkSpeed?: string;
gpsEnabled?: boolean;
isHeadless?: boolean;
adbExecTimeout?: number;
localeScript?: string;
skipDeviceInitialization?: boolean;
chromedriverDisableBuildCheck?: boolean;
skipUnlock?: boolean;
unlockType?: string;
unlockKey?: string;
autoLaunch?: boolean;
skipLogcatCapture?: boolean;
uninstallOtherPackages?: string;
disableWindowAnimation?: boolean;
uiautomator2ServerLaunchTimeout?: number;
uiautomator2ServerInstallTimeout?: number;
skipServerInstallation?: boolean;
espressoServerLaunchTimeout?: number;
disableSuppressAccessibilityService?: boolean;
'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://github.com/appium/appium-xcuitest-driver
*/
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
}