appium 2.0.0-beta.9 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +149 -58
- package/build/lib/appium.d.ts +229 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +677 -449
- package/build/lib/appium.js.map +1 -0
- package/build/lib/cli/args.d.ts +17 -0
- package/build/lib/cli/args.d.ts.map +1 -0
- package/build/lib/cli/args.js +263 -300
- package/build/lib/cli/args.js.map +1 -0
- package/build/lib/cli/driver-command.d.ts +102 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -0
- package/build/lib/cli/driver-command.js +131 -81
- package/build/lib/cli/driver-command.js.map +1 -0
- package/build/lib/cli/extension-command.d.ts +402 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +799 -383
- package/build/lib/cli/extension-command.js.map +1 -0
- package/build/lib/cli/extension.d.ts +23 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +70 -68
- package/build/lib/cli/extension.js.map +1 -0
- package/build/lib/cli/parser.d.ts +84 -0
- package/build/lib/cli/parser.d.ts.map +1 -0
- package/build/lib/cli/parser.js +252 -148
- package/build/lib/cli/parser.js.map +1 -0
- package/build/lib/cli/plugin-command.d.ts +99 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +125 -81
- package/build/lib/cli/plugin-command.js.map +1 -0
- package/build/lib/cli/utils.d.ts +29 -0
- package/build/lib/cli/utils.d.ts.map +1 -0
- package/build/lib/cli/utils.js +72 -51
- package/build/lib/cli/utils.js.map +1 -0
- package/build/lib/config-file.d.ts +100 -0
- package/build/lib/config-file.d.ts.map +1 -0
- package/build/lib/config-file.js +207 -0
- package/build/lib/config-file.js.map +1 -0
- package/build/lib/config.d.ts +49 -0
- package/build/lib/config.d.ts.map +1 -0
- package/build/lib/config.js +262 -223
- package/build/lib/config.js.map +1 -0
- package/build/lib/constants.d.ts +56 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +73 -0
- package/build/lib/constants.js.map +1 -0
- package/build/lib/extension/driver-config.d.ts +82 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +210 -0
- package/build/lib/extension/driver-config.js.map +1 -0
- package/build/lib/extension/extension-config.d.ts +270 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +601 -0
- package/build/lib/extension/extension-config.js.map +1 -0
- package/build/lib/extension/index.d.ts +48 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +105 -0
- package/build/lib/extension/index.js.map +1 -0
- package/build/lib/extension/manifest-migrations.d.ts +27 -0
- package/build/lib/extension/manifest-migrations.d.ts.map +1 -0
- package/build/lib/extension/manifest-migrations.js +134 -0
- package/build/lib/extension/manifest-migrations.js.map +1 -0
- package/build/lib/extension/manifest.d.ts +145 -0
- package/build/lib/extension/manifest.d.ts.map +1 -0
- package/build/lib/extension/manifest.js +528 -0
- package/build/lib/extension/manifest.js.map +1 -0
- package/build/lib/extension/package-changed.d.ts +11 -0
- package/build/lib/extension/package-changed.d.ts.map +1 -0
- package/build/lib/extension/package-changed.js +62 -0
- package/build/lib/extension/package-changed.js.map +1 -0
- package/build/lib/extension/plugin-config.d.ts +56 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +102 -0
- package/build/lib/extension/plugin-config.js.map +1 -0
- package/build/lib/grid-register.d.ts +10 -0
- package/build/lib/grid-register.d.ts.map +1 -0
- package/build/lib/grid-register.js +122 -144
- package/build/lib/grid-register.js.map +1 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -17
- package/build/lib/logger.js.map +1 -0
- package/build/lib/logsink.d.ts +4 -0
- package/build/lib/logsink.d.ts.map +1 -0
- package/build/lib/logsink.js +189 -184
- package/build/lib/logsink.js.map +1 -0
- package/build/lib/main.d.ts +62 -0
- package/build/lib/main.d.ts.map +1 -0
- package/build/lib/main.js +406 -234
- package/build/lib/main.js.map +1 -0
- package/build/lib/schema/arg-spec.d.ts +143 -0
- package/build/lib/schema/arg-spec.d.ts.map +1 -0
- package/build/lib/schema/arg-spec.js +164 -0
- package/build/lib/schema/arg-spec.js.map +1 -0
- package/build/lib/schema/cli-args.d.ts +19 -0
- package/build/lib/schema/cli-args.d.ts.map +1 -0
- package/build/lib/schema/cli-args.js +220 -0
- package/build/lib/schema/cli-args.js.map +1 -0
- package/build/lib/schema/cli-transformers.d.ts +5 -0
- package/build/lib/schema/cli-transformers.d.ts.map +1 -0
- package/build/lib/schema/cli-transformers.js +124 -0
- package/build/lib/schema/cli-transformers.js.map +1 -0
- package/build/lib/schema/index.d.ts +3 -0
- package/build/lib/schema/index.d.ts.map +1 -0
- package/build/lib/schema/index.js +19 -0
- package/build/lib/schema/index.js.map +1 -0
- package/build/lib/schema/keywords.d.ts +24 -0
- package/build/lib/schema/keywords.d.ts.map +1 -0
- package/build/lib/schema/keywords.js +128 -0
- package/build/lib/schema/keywords.js.map +1 -0
- package/build/lib/schema/schema.d.ts +260 -0
- package/build/lib/schema/schema.d.ts.map +1 -0
- package/build/lib/schema/schema.js +640 -0
- package/build/lib/schema/schema.js.map +1 -0
- package/build/lib/utils.d.ts +276 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +372 -192
- package/build/lib/utils.js.map +1 -0
- package/build/types/cli.d.ts +134 -0
- package/build/types/cli.d.ts.map +1 -0
- package/build/types/cli.js +3 -0
- package/build/types/cli.js.map +1 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +19 -0
- package/build/types/index.js.map +1 -0
- package/build/types/manifest/base.d.ts +135 -0
- package/build/types/manifest/base.d.ts.map +1 -0
- package/build/types/manifest/base.js +3 -0
- package/build/types/manifest/base.js.map +1 -0
- package/build/types/manifest/index.d.ts +21 -0
- package/build/types/manifest/index.d.ts.map +1 -0
- package/build/types/manifest/index.js +42 -0
- package/build/types/manifest/index.js.map +1 -0
- package/build/types/manifest/v3.d.ts +139 -0
- package/build/types/manifest/v3.d.ts.map +1 -0
- package/build/types/manifest/v3.js +3 -0
- package/build/types/manifest/v3.js.map +1 -0
- package/build/types/manifest/v4.d.ts +139 -0
- package/build/types/manifest/v4.d.ts.map +1 -0
- package/build/types/manifest/v4.js +3 -0
- package/build/types/manifest/v4.js.map +1 -0
- package/driver.d.ts +1 -0
- package/driver.js +14 -0
- package/index.js +11 -0
- package/lib/appium.js +545 -188
- package/lib/cli/args.js +275 -407
- package/lib/cli/driver-command.js +132 -24
- package/lib/cli/extension-command.js +751 -272
- package/lib/cli/extension.js +38 -19
- package/lib/cli/parser.js +267 -95
- package/lib/cli/plugin-command.js +122 -22
- package/lib/cli/utils.js +24 -10
- package/lib/config-file.js +220 -0
- package/lib/config.js +243 -132
- package/lib/constants.js +79 -0
- package/lib/extension/driver-config.js +247 -0
- package/lib/extension/extension-config.js +709 -0
- package/lib/extension/index.js +116 -0
- package/lib/extension/manifest-migrations.js +136 -0
- package/lib/extension/manifest.js +580 -0
- package/lib/extension/package-changed.js +64 -0
- package/lib/extension/plugin-config.js +112 -0
- package/lib/grid-register.js +49 -35
- package/lib/logger.js +1 -2
- package/lib/logsink.js +59 -36
- package/lib/main.js +392 -104
- package/lib/schema/arg-spec.js +229 -0
- package/lib/schema/cli-args.js +241 -0
- package/lib/schema/cli-transformers.js +119 -0
- package/lib/schema/index.js +2 -0
- package/lib/schema/keywords.js +136 -0
- package/lib/schema/schema.js +725 -0
- package/lib/utils.js +310 -89
- package/package.json +84 -84
- package/plugin.d.ts +1 -0
- package/plugin.js +13 -0
- package/scripts/autoinstall-extensions.js +243 -0
- package/support.d.ts +1 -0
- package/support.js +13 -0
- package/tsconfig.json +25 -0
- package/types/cli.ts +193 -0
- package/types/index.ts +20 -0
- package/types/manifest/README.md +30 -0
- package/types/manifest/base.ts +158 -0
- package/types/manifest/index.ts +28 -0
- package/types/manifest/v3.ts +161 -0
- package/types/manifest/v4.ts +161 -0
- package/CHANGELOG.md +0 -3669
- package/bin/ios-webkit-debug-proxy-launcher.js +0 -71
- package/build/lib/cli/argparse-actions.js +0 -104
- package/build/lib/cli/npm.js +0 -207
- package/build/lib/cli/parser-helpers.js +0 -93
- package/build/lib/driver-config.js +0 -77
- package/build/lib/drivers.js +0 -99
- package/build/lib/extension-config.js +0 -253
- package/build/lib/plugin-config.js +0 -59
- package/build/lib/plugins.js +0 -16
- package/build/postinstall.js +0 -90
- package/lib/cli/argparse-actions.js +0 -77
- package/lib/cli/npm.js +0 -183
- package/lib/cli/parser-helpers.js +0 -91
- package/lib/driver-config.js +0 -46
- package/lib/drivers.js +0 -84
- package/lib/extension-config.js +0 -209
- package/lib/plugin-config.js +0 -34
- package/lib/plugins.js +0 -11
- package/postinstall.js +0 -71
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,51 +1,161 @@
|
|
|
1
1
|
## Appium
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.org/package/appium)
|
|
4
|
-
[](https://david-dm.org/appium/appium)
|
|
5
|
-
[](https://david-dm.org/appium/appium#info=devDependencies)
|
|
6
|
-
|
|
7
4
|
[](https://npmjs.org/package/appium)
|
|
8
5
|
|
|
9
6
|
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)
|
|
10
7
|
|
|
8
|
+
[](https://github.com/vshymanskyy/StandWithUkraine/)
|
|
9
|
+
|
|
10
|
+
[](https://vshymanskyy.github.io/StandWithUkraine/)
|
|
11
|
+
|
|
11
12
|
Appium is an open-source, cross-platform test automation tool for native,
|
|
12
|
-
hybrid,
|
|
13
|
-
(
|
|
13
|
+
hybrid, mobile web and desktop apps. Initially created to automate iOS and Android mobile
|
|
14
|
+
applications Appium has grown to a full-featured platform that provides [WebDriver](https://www.w3.org/TR/webdriver/)-based automation possibilities for the whole set of different mobile and desktop platforms.
|
|
15
|
+
See the full list of
|
|
16
|
+
[officially-supported](https://appium.io/docs/en/latest/ecosystem/#drivers) and
|
|
17
|
+
[third-party](https://appium.io/docs/en/latest/ecosystem/#other-drivers) drivers for more details.
|
|
18
|
+
|
|
19
|
+
:bangbang: Major documentation revision in progress
|
|
20
|
+
|
|
21
|
+
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x anymore, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
|
|
22
|
+
|
|
23
|
+
Appium is in the final stages of a major revision (to version 2.0). As such, the documentation
|
|
24
|
+
found around the web may not be correct. The current Appium 2.0 documentation is very much in
|
|
25
|
+
progress. Currently, it can be found [here](https://appium.io/docs/en/latest/).
|
|
26
|
+
|
|
27
|
+
### Requirements
|
|
28
|
+
|
|
29
|
+
- macOS, Linux or Windows operating system
|
|
30
|
+
- Node.js 14+
|
|
31
|
+
- NPM (Node Package Manager) 8+
|
|
32
|
+
|
|
33
|
+
These are only server requirements. Each driver might have its own requirements. Consider checking the corresponding driver tutorial for more details.
|
|
14
34
|
|
|
15
|
-
|
|
16
|
-
started](/docs/en/about-appium/getting-started.md) doc.
|
|
35
|
+
### Server
|
|
17
36
|
|
|
18
|
-
|
|
37
|
+
To install Appium 2 server using Node Package Manager (npm) run the following command:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g appium@next
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
:bangbang: Running `npm install -g appium` would still install Appium 1 because version 2 is in its late beta stage.
|
|
44
|
+
|
|
45
|
+
### Drivers
|
|
19
46
|
|
|
20
47
|
Appium supports app automation across a variety of platforms, like iOS,
|
|
21
48
|
Android, and Windows. Each platform is supported by one or more "drivers",
|
|
22
|
-
which know how to automate that particular platform.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
which know how to automate that particular platform. Since version 2.0
|
|
50
|
+
all drivers have been isolated from the Appium server app and can
|
|
51
|
+
be managed independently using the [appium driver](https://appiumpro.com/editions/122-installing-appium-20-and-the-driver-and-plugins-cli) command line interface.
|
|
52
|
+
|
|
53
|
+
In general, the drivers management in Appium 2 is as simple as:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# To install a new driver from npm
|
|
57
|
+
appium driver install --source=npm appium-xcuitest-driver[@<version>]
|
|
58
|
+
# To install a driver from a local folder (useful for developers)
|
|
59
|
+
appium driver install --source=local /Users/me/sources/appium-xcuitest-driver
|
|
60
|
+
# To install a new driver from github (hm, maybe it's time to publish it to NPM?)
|
|
61
|
+
appium driver install --source=github --package=appium-xcuitest-driver appium/appium-xcuitest-driver
|
|
62
|
+
|
|
63
|
+
# To list already installed drivers
|
|
64
|
+
appium driver list --installed
|
|
65
|
+
|
|
66
|
+
# To update a driver (it must be already installed)
|
|
67
|
+
appium driver update xcuitest
|
|
68
|
+
|
|
69
|
+
# To uninstall a driver (it won't last forever, wouldn't it?)
|
|
70
|
+
appium driver uninstall xcuitest
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
You can find a full list of
|
|
74
|
+
[officially-supported](https://appium.io/docs/en/latest/ecosystem/#drivers) and
|
|
75
|
+
[third-party](https://appium.io/docs/en/latest/ecosystem/#other-drivers) drivers at
|
|
76
|
+
the current Appium 2.0 documentation.
|
|
77
|
+
|
|
78
|
+
### Plugins
|
|
79
|
+
|
|
80
|
+
The concept of plugins is something new that has been added exclusively to Appium2. Plugins allow you to extend server functionality without changing the server code. Plugins could be managed similarly to drivers:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# To install an officially supported plugin
|
|
84
|
+
appium plugin install images
|
|
85
|
+
# To install a plugin from a local folder (useful for developers)
|
|
86
|
+
appium plugin install --source=local /Users/me/sources/images
|
|
87
|
+
# To install a new plugin from npm
|
|
88
|
+
appium plugin install --source=npm appium-device-farm
|
|
89
|
+
|
|
90
|
+
# To list already installed plugins
|
|
91
|
+
appium plugin list --installed
|
|
92
|
+
|
|
93
|
+
# To update a plugins (it must be already installed)
|
|
94
|
+
appium plugin update appium-device-farm
|
|
95
|
+
|
|
96
|
+
# To uninstall a plugin
|
|
97
|
+
appium plugin uninstall appium-device-farm
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The main difference between drivers and plugins is that the latter must be explicitly enabled on server startup after it was installed (drivers are enabled by default after installation):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
appium server --use-plugins=device-farm,images
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
You can find a full list of
|
|
107
|
+
[officially-supported](https://appium.io/docs/en/latest/ecosystem/#plugins) and
|
|
108
|
+
[third-party](https://appium.io/docs/en/latest/ecosystem/#other-plugins) plugins at
|
|
109
|
+
the current Appium 2.0 documentation.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Server Command Line Interface
|
|
113
|
+
|
|
114
|
+
In order to start sending commands to Appium over the wire it must be listening
|
|
115
|
+
on the URL where your client library expects it to listen.
|
|
116
|
+
Use the following commands to run and configure Appium server:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Start the server on the default port and host (e.g. http://0.0.0.0:4723/)
|
|
120
|
+
appium server
|
|
121
|
+
# Start the server on the given port, host and use the base path prefix (the default prefix is /)
|
|
122
|
+
appium server -p 9000 -a 127.0.0.1 -pa /wd/hub
|
|
123
|
+
|
|
124
|
+
# Get the list of all supported command line parameters.
|
|
125
|
+
# This list would also include descriptions of driver-specific
|
|
126
|
+
# command line arguments for all installed drivers.
|
|
127
|
+
# Each driver and plugin must have their command line arguments
|
|
128
|
+
# exposed in a special JSON schema declared as a part of the corresponding
|
|
129
|
+
# package.json file.
|
|
130
|
+
appium server --help
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Appium supports execution of parallel server processes as well as parallel driver sessions within
|
|
134
|
+
single server process. Refer the corresponding driver documentations regarding which mode is optimal
|
|
135
|
+
for the particular driver or whether it supports parallel sessions.
|
|
34
136
|
|
|
35
137
|
### Why Appium?
|
|
36
138
|
|
|
37
|
-
1. You don't have to recompile your app or modify it in any way, due
|
|
139
|
+
1. You usually don't have to recompile your app or modify it in any way, due
|
|
38
140
|
to the use of standard automation APIs on all platforms.
|
|
39
141
|
2. You can write tests with your favorite dev tools using any
|
|
40
142
|
[WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html)-compatible
|
|
41
|
-
language such as Java
|
|
42
|
-
|
|
43
|
-
|
|
143
|
+
language such as [Java](https://github.com/appium/java-client),
|
|
144
|
+
[JavaScript](https://webdriver.io/), [Python](https://github.com/appium/python-client),
|
|
145
|
+
[Ruby](https://github.com/appium/ruby_lib), [C#](https://github.com/appium/dotnet-client)
|
|
146
|
+
with the Selenium WebDriver API. There are also various third party
|
|
147
|
+
client implementations for other languages.
|
|
44
148
|
3. You can use any testing framework.
|
|
45
|
-
4.
|
|
46
|
-
script, you can switch seamlessly between native
|
|
47
|
-
automation, all using the WebDriver model that's already
|
|
48
|
-
web automation.
|
|
149
|
+
4. Some drivers, like xcuitest and uiautomator2 ones have built-in mobile web and
|
|
150
|
+
hybrid app support. Within the same script, you can switch seamlessly between native
|
|
151
|
+
app automation and webview automation, all using the WebDriver model that's already
|
|
152
|
+
the standard for web automation.
|
|
153
|
+
5. You can run your automated tests locally and in a cloud. There are multiple
|
|
154
|
+
cloud providers that support various Appium drivers (mostly
|
|
155
|
+
targeting iOS and Android mobile automation).
|
|
156
|
+
6. [Appium Inspector](https://github.com/appium/appium-inspector) allows
|
|
157
|
+
visual debugging of automated tests and could be extremely useful for
|
|
158
|
+
beginners.
|
|
49
159
|
|
|
50
160
|
Investing in the
|
|
51
161
|
[WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) protocol means
|
|
@@ -59,35 +169,21 @@ Java/Kotlin. Appium opens up the possibility of true cross-platform native app
|
|
|
59
169
|
automation, for mobile and beyond. Finally!
|
|
60
170
|
|
|
61
171
|
If you're new to Appium or want a more comprehensive description of what this is all
|
|
62
|
-
about, please read our [
|
|
63
|
-
Concepts](/docs/en/about-appium/intro.md).
|
|
172
|
+
about, please read our [Intro to Appium](https://appium.io/docs/en/latest/intro/).
|
|
64
173
|
|
|
65
|
-
###
|
|
174
|
+
### Quickstart
|
|
66
175
|
|
|
67
|
-
|
|
68
|
-
to run tests on. Each of the drivers above documents the requirements for their
|
|
69
|
-
particular brand of automation. At a minimum, you will need to be able to run
|
|
70
|
-
Node.js 10+.
|
|
71
|
-
|
|
72
|
-
### Get Started
|
|
73
|
-
|
|
74
|
-
Check out our [Getting Started](/docs/en/about-appium/getting-started.md) guide
|
|
176
|
+
Check out our [Quickstart](https://appium.io/docs/en/latest/quickstart/) guide
|
|
75
177
|
to get going with Appium.
|
|
76
178
|
|
|
77
179
|
There is also a sample code that contains [many examples of tests in a variety
|
|
78
|
-
of different languages](https://github.com/appium/appium/tree/
|
|
180
|
+
of different languages](https://github.com/appium/appium/tree/1.x/sample-code)!
|
|
79
181
|
|
|
80
182
|
### Documentation
|
|
81
183
|
|
|
82
|
-
For prettily-rendered docs, please visit [
|
|
83
|
-
always find the full list of Appium doc pages at [Appium's GitHub
|
|
84
|
-
Repo](https://github.com/appium/appium/tree/master/
|
|
85
|
-
|
|
86
|
-
[update-appium-io.yml](https://github.com/appium/appium/blob/master/ci-jobs/update-appium-io.yml) creates a PR
|
|
87
|
-
by [CI job](https://dev.azure.com/AppiumCI/Appium%20CI/_build?definitionId=37).
|
|
88
|
-
in the appium.io repository with the documentation update.
|
|
89
|
-
|
|
90
|
-
Once the PR has been merged, the latest documentation will be in [appium.io](http://appium.io)
|
|
184
|
+
For prettily-rendered docs, please visit [Appium Documentation](https://appium.io).
|
|
185
|
+
You can always find the full list of Appium doc pages at [Appium's GitHub
|
|
186
|
+
Repo](https://github.com/appium/appium/tree/master/packages/appium/docs) as well.
|
|
91
187
|
|
|
92
188
|
### Contributing
|
|
93
189
|
|
|
@@ -100,21 +196,16 @@ Interested in where Appium is heading in the future? Check out the [Roadmap](ROA
|
|
|
100
196
|
|
|
101
197
|
### Project History, Credits & Inspiration
|
|
102
198
|
|
|
103
|
-
* [History](
|
|
104
|
-
* [Credits](/docs/en/contributing-to-appium/credits.md)
|
|
199
|
+
* [History](https://appium.io/docs/en/latest/intro/history/)
|
|
105
200
|
|
|
106
201
|
### User Forums
|
|
107
202
|
|
|
108
|
-
Announcements and debates often take place on the [Discussion
|
|
109
|
-
|
|
203
|
+
Announcements and debates often take place on the [Discussion Group](https://discuss.appium.io),
|
|
204
|
+
be sure to sign up!
|
|
110
205
|
|
|
111
206
|
### Troubleshooting
|
|
112
207
|
|
|
113
|
-
|
|
114
|
-
guide](/docs/en/writing-running-appium/other/troubleshooting.md). Please have a look
|
|
115
|
-
here first if you run into any problems. It contains instructions for checking
|
|
116
|
-
a lot of common errors and how to get in touch with the community if you're
|
|
117
|
-
stumped.
|
|
208
|
+
Please find the troubleshooting guide at the corresponding driver repository/documentation.
|
|
118
209
|
|
|
119
210
|
### License
|
|
120
211
|
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when Appium tried to proxy a command using a driver's `proxyCommand` method but the
|
|
3
|
+
* method did not exist
|
|
4
|
+
*/
|
|
5
|
+
export class NoDriverProxyCommandError extends Error {
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* @type {Readonly<string>}
|
|
9
|
+
*/
|
|
10
|
+
code: Readonly<string>;
|
|
11
|
+
}
|
|
12
|
+
export type DriverData = import('@appium/types').DriverData;
|
|
13
|
+
export type DriverOpts = import('@appium/types').ServerArgs;
|
|
14
|
+
export type Constraints = import('@appium/types').Constraints;
|
|
15
|
+
export type AppiumServer = import('@appium/types').AppiumServer;
|
|
16
|
+
export type ExtensionType = import('@appium/types').ExtensionType;
|
|
17
|
+
export type DriverConfig = import('./extension/driver-config').DriverConfig;
|
|
18
|
+
export type PluginType = import('@appium/types').PluginType;
|
|
19
|
+
export type DriverType = import('@appium/types').DriverType;
|
|
20
|
+
export type StringRecord = import('@appium/types').StringRecord;
|
|
21
|
+
export type ExternalDriver = import('@appium/types').ExternalDriver;
|
|
22
|
+
export type PluginClass = import('@appium/types').PluginClass;
|
|
23
|
+
export type Plugin = import('@appium/types').Plugin;
|
|
24
|
+
export type DriverClass = import('@appium/types').DriverClass<import('@appium/types').Driver>;
|
|
25
|
+
export type AppiumSessionHandler = import('@appium/types').ISessionHandler<AppiumDriverConstraints, SessionHandlerCreateResult, SessionHandlerDeleteResult>;
|
|
26
|
+
export type SessionHandlerCreateResult = SessionHandlerResult<[
|
|
27
|
+
innerSessionId: string,
|
|
28
|
+
caps: import('@appium/types').DriverCaps<Constraints>,
|
|
29
|
+
protocol: string | undefined
|
|
30
|
+
]>;
|
|
31
|
+
export type Core<C extends import("@appium/types").Constraints> = import('@appium/types').Core<C>;
|
|
32
|
+
export type SessionHandlerDeleteResult = SessionHandlerResult<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Used by {@linkcode AppiumDriver.createSession } and {@linkcode AppiumDriver.deleteSession } to describe
|
|
35
|
+
* result.
|
|
36
|
+
*/
|
|
37
|
+
export type SessionHandlerResult<V> = {
|
|
38
|
+
value?: V | undefined;
|
|
39
|
+
error?: Error | undefined;
|
|
40
|
+
protocol?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
export type AppiumDriverConstraints = typeof desiredCapabilityConstraints;
|
|
43
|
+
export type W3CAppiumDriverCaps = import('@appium/types').W3CDriverCaps<AppiumDriverConstraints>;
|
|
44
|
+
/**
|
|
45
|
+
* @extends {DriverCore<AppiumDriverConstraints>}
|
|
46
|
+
*/
|
|
47
|
+
export class AppiumDriver extends DriverCore<{
|
|
48
|
+
readonly automationName: {
|
|
49
|
+
readonly presence: true;
|
|
50
|
+
readonly isString: true;
|
|
51
|
+
};
|
|
52
|
+
readonly platformName: {
|
|
53
|
+
readonly presence: true;
|
|
54
|
+
readonly isString: true;
|
|
55
|
+
};
|
|
56
|
+
}, import("../../base-driver/build/lib/basedriver/core").StringRecord> {
|
|
57
|
+
/**
|
|
58
|
+
* @param {import('@appium/types').DriverOpts<AppiumDriverConstraints>} opts
|
|
59
|
+
*/
|
|
60
|
+
constructor(opts: import('@appium/types').DriverOpts<AppiumDriverConstraints>);
|
|
61
|
+
/**
|
|
62
|
+
* Access to sessions list must be guarded with a Semaphore, because
|
|
63
|
+
* it might be changed by other async calls at any time
|
|
64
|
+
* It is not recommended to access this property directly from the outside
|
|
65
|
+
* @type {Record<string,ExternalDriver>}
|
|
66
|
+
*/
|
|
67
|
+
sessions: Record<string, ExternalDriver>;
|
|
68
|
+
/**
|
|
69
|
+
* Access to pending drivers list must be guarded with a Semaphore, because
|
|
70
|
+
* it might be changed by other async calls at any time
|
|
71
|
+
* It is not recommended to access this property directly from the outside
|
|
72
|
+
* @type {Record<string,ExternalDriver[]>}
|
|
73
|
+
*/
|
|
74
|
+
pendingDrivers: Record<string, ExternalDriver[]>;
|
|
75
|
+
/**
|
|
76
|
+
* List of active plugins
|
|
77
|
+
* @type {Map<PluginClass,string>}
|
|
78
|
+
*/
|
|
79
|
+
pluginClasses: Map<PluginClass, string>;
|
|
80
|
+
/**
|
|
81
|
+
* map of sessions to actual plugin instances per session
|
|
82
|
+
* @type {Record<string,InstanceType<PluginClass>[]>}
|
|
83
|
+
*/
|
|
84
|
+
sessionPlugins: Record<string, InstanceType<PluginClass>[]>;
|
|
85
|
+
/**
|
|
86
|
+
* some commands are sessionless, so we need a set of plugins for them
|
|
87
|
+
* @type {InstanceType<PluginClass>[]}
|
|
88
|
+
*/
|
|
89
|
+
sessionlessPlugins: InstanceType<PluginClass>[];
|
|
90
|
+
/** @type {DriverConfig} */
|
|
91
|
+
driverConfig: DriverConfig;
|
|
92
|
+
/** @type {AppiumServer} */
|
|
93
|
+
server: AppiumServer;
|
|
94
|
+
/**
|
|
95
|
+
* @type {AppiumDriverConstraints}
|
|
96
|
+
* @readonly
|
|
97
|
+
*/
|
|
98
|
+
readonly desiredCapConstraints: AppiumDriverConstraints;
|
|
99
|
+
/** @type {import('@appium/types').DriverOpts<AppiumDriverConstraints>} */
|
|
100
|
+
args: import('@appium/types').DriverOpts<AppiumDriverConstraints>;
|
|
101
|
+
sessionExists(sessionId: any): boolean;
|
|
102
|
+
driverForSession(sessionId: any): import("@appium/types").ExternalDriver<import("@appium/types").Constraints, string>;
|
|
103
|
+
getStatus(): Promise<{
|
|
104
|
+
build: import("../types").BuildInfo;
|
|
105
|
+
}>;
|
|
106
|
+
getSessions(): Promise<{
|
|
107
|
+
id: string;
|
|
108
|
+
capabilities: import("@appium/types").DriverCaps<import("@appium/types").Constraints>;
|
|
109
|
+
}[]>;
|
|
110
|
+
printNewSessionAnnouncement(driverName: any, driverVersion: any, driverBaseVersion: any): void;
|
|
111
|
+
/**
|
|
112
|
+
* Retrieves all CLI arguments for a specific plugin.
|
|
113
|
+
* @param {string} extName - Plugin name
|
|
114
|
+
* @returns {StringRecord} Arguments object. If none, an empty object.
|
|
115
|
+
*/
|
|
116
|
+
getCliArgsForPlugin(extName: string): StringRecord;
|
|
117
|
+
/**
|
|
118
|
+
* Retrieves CLI args for a specific driver.
|
|
119
|
+
*
|
|
120
|
+
* _Any arg which is equal to its default value will not be present in the returned object._
|
|
121
|
+
*
|
|
122
|
+
* _Note that this behavior currently (May 18 2022) differs from how plugins are handled_ (see {@linkcode AppiumDriver.getCliArgsForPlugin}).
|
|
123
|
+
* @param {string} extName - Driver name
|
|
124
|
+
* @returns {StringRecord|undefined} Arguments object. If none, `undefined`
|
|
125
|
+
*/
|
|
126
|
+
getCliArgsForDriver(extName: string): StringRecord | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Create a new session
|
|
129
|
+
* @param {W3CAppiumDriverCaps} jsonwpCaps JSONWP formatted desired capabilities
|
|
130
|
+
* @param {W3CAppiumDriverCaps} [reqCaps] Required capabilities (JSONWP standard)
|
|
131
|
+
* @param {W3CAppiumDriverCaps} [w3cCapabilities] W3C capabilities
|
|
132
|
+
* @returns {Promise<SessionHandlerCreateResult>}
|
|
133
|
+
*/
|
|
134
|
+
createSession(jsonwpCaps: W3CAppiumDriverCaps, reqCaps?: W3CAppiumDriverCaps | undefined, w3cCapabilities?: W3CAppiumDriverCaps | undefined): Promise<SessionHandlerCreateResult>;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @param {ExternalDriver} driver
|
|
138
|
+
* @param {string} innerSessionId
|
|
139
|
+
*/
|
|
140
|
+
attachUnexpectedShutdownHandler(driver: ExternalDriver, innerSessionId: string): void;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param {((...args: any[]) => any)|(new(...args: any[]) => any)} InnerDriver
|
|
144
|
+
* @returns {Promise<DriverData[]>}}
|
|
145
|
+
* @privateRemarks The _intent_ is that `InnerDriver` is the class of a driver, but it only really
|
|
146
|
+
* needs to be a function or constructor.
|
|
147
|
+
*/
|
|
148
|
+
curSessionDataForDriver(InnerDriver: ((...args: any[]) => any) | (new (...args: any[]) => any)): Promise<DriverData[]>;
|
|
149
|
+
/**
|
|
150
|
+
* @param {string} sessionId
|
|
151
|
+
*/
|
|
152
|
+
deleteSession(sessionId: string): Promise<{
|
|
153
|
+
protocol: undefined;
|
|
154
|
+
value: void;
|
|
155
|
+
error?: undefined;
|
|
156
|
+
} | {
|
|
157
|
+
protocol: undefined;
|
|
158
|
+
error: any;
|
|
159
|
+
value?: undefined;
|
|
160
|
+
}>;
|
|
161
|
+
deleteAllSessions(opts?: {}): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Get the appropriate plugins for a session (or sessionless plugins)
|
|
164
|
+
*
|
|
165
|
+
* @param {?string} sessionId - the sessionId (or null) to use to find plugins
|
|
166
|
+
* @returns {Array} - array of plugin instances
|
|
167
|
+
*/
|
|
168
|
+
pluginsForSession(sessionId?: string | null): any[];
|
|
169
|
+
/**
|
|
170
|
+
* To get plugins for a command, we either get the plugin instances associated with the
|
|
171
|
+
* particular command's session, or in the case of sessionless plugins, pull from the set of
|
|
172
|
+
* plugin instances reserved for sessionless commands (and we lazily create plugin instances on
|
|
173
|
+
* first use)
|
|
174
|
+
*
|
|
175
|
+
* @param {string} cmd - the name of the command to find a plugin to handle
|
|
176
|
+
* @param {?string} sessionId - the particular session for which to find a plugin, or null if
|
|
177
|
+
* sessionless
|
|
178
|
+
*/
|
|
179
|
+
pluginsToHandleCmd(cmd: string, sessionId?: string | null): any[];
|
|
180
|
+
/**
|
|
181
|
+
* Creates instances of all of the enabled Plugin classes
|
|
182
|
+
* @returns {Plugin[]}
|
|
183
|
+
*/
|
|
184
|
+
createPluginInstances(): Plugin[];
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @param {string} cmd
|
|
188
|
+
* @param {...any} args
|
|
189
|
+
* @returns {Promise<{value: any, error?: Error, protocol: string} | import('type-fest').AsyncReturnType<ExternalDriver['executeCommand']>>}
|
|
190
|
+
*/
|
|
191
|
+
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
192
|
+
wrapCommandWithPlugins({ driver, cmd, args, next, cmdHandledBy, plugins }: {
|
|
193
|
+
driver: any;
|
|
194
|
+
cmd: any;
|
|
195
|
+
args: any;
|
|
196
|
+
next: any;
|
|
197
|
+
cmdHandledBy: any;
|
|
198
|
+
plugins: any;
|
|
199
|
+
}): any;
|
|
200
|
+
logPluginHandlerReport(plugins: any, { cmd, cmdHandledBy }: {
|
|
201
|
+
cmd: any;
|
|
202
|
+
cmdHandledBy: any;
|
|
203
|
+
}): void;
|
|
204
|
+
executeWrappedCommand({ wrappedCmd, protocol }: {
|
|
205
|
+
wrappedCmd: any;
|
|
206
|
+
protocol: any;
|
|
207
|
+
}): Promise<{
|
|
208
|
+
value: any;
|
|
209
|
+
error: any;
|
|
210
|
+
protocol: any;
|
|
211
|
+
}>;
|
|
212
|
+
proxyActive(sessionId: any): boolean;
|
|
213
|
+
canProxy(sessionId: any): boolean;
|
|
214
|
+
}
|
|
215
|
+
declare namespace desiredCapabilityConstraints {
|
|
216
|
+
namespace automationName {
|
|
217
|
+
const presence: true;
|
|
218
|
+
const isString: true;
|
|
219
|
+
}
|
|
220
|
+
namespace platformName {
|
|
221
|
+
const presence_1: true;
|
|
222
|
+
export { presence_1 as presence };
|
|
223
|
+
const isString_1: true;
|
|
224
|
+
export { isString_1 as isString };
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
import { DriverCore } from "@appium/base-driver";
|
|
228
|
+
export {};
|
|
229
|
+
//# sourceMappingURL=appium.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium.d.ts","sourceRoot":"","sources":["../../lib/appium.js"],"names":[],"mappings":"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"}
|