appium 2.0.0-beta.26 → 2.0.0-beta.29
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/build/lib/appium.d.ts +215 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +62 -54
- package/build/lib/cli/args.d.ts +20 -0
- package/build/lib/cli/args.d.ts.map +1 -0
- package/build/lib/cli/args.js +1 -1
- package/build/lib/cli/driver-command.d.ts +36 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -0
- package/build/lib/cli/driver-command.js +8 -7
- package/build/lib/cli/extension-command.d.ts +345 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +52 -38
- package/build/lib/cli/extension.d.ts +14 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +7 -2
- package/build/lib/cli/parser.d.ts +79 -0
- package/build/lib/cli/parser.d.ts.map +1 -0
- package/build/lib/cli/parser.js +1 -1
- package/build/lib/cli/plugin-command.d.ts +39 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +6 -7
- 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 +1 -1
- 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 +1 -1
- package/build/lib/config.d.ts +40 -0
- package/build/lib/config.d.ts.map +1 -0
- package/build/lib/config.js +2 -2
- package/build/lib/constants.d.ts +48 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +1 -1
- package/build/lib/extension/driver-config.d.ts +84 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +1 -1
- package/build/lib/extension/extension-config.d.ts +170 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +2 -2
- package/build/lib/extension/index.d.ts +39 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +1 -1
- package/build/lib/extension/manifest.d.ts +174 -0
- package/build/lib/extension/manifest.d.ts.map +1 -0
- package/build/lib/extension/manifest.js +1 -1
- 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 +1 -1
- package/build/lib/extension/plugin-config.d.ts +62 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +1 -1
- package/build/lib/grid-register.d.ts +10 -0
- package/build/lib/grid-register.d.ts.map +1 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.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 +1 -1
- package/build/lib/main.d.ts +51 -0
- package/build/lib/main.d.ts.map +1 -0
- package/build/lib/main.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/build/lib/schema/index.d.ts +3 -0
- package/build/lib/schema/index.d.ts.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 +1 -1
- package/build/lib/schema/schema.d.ts +259 -0
- package/build/lib/schema/schema.d.ts.map +1 -0
- package/build/lib/schema/schema.js +3 -3
- package/build/lib/utils.d.ts +66 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +6 -4
- package/build/tsconfig.tsbuildinfo +1 -0
- package/lib/appium.js +163 -81
- package/lib/cli/args.js +1 -2
- package/lib/cli/driver-command.js +11 -8
- package/lib/cli/extension-command.js +129 -80
- package/lib/cli/extension.js +13 -3
- package/lib/cli/parser.js +1 -2
- package/lib/cli/plugin-command.js +16 -6
- package/lib/cli/utils.js +1 -1
- package/lib/config-file.js +3 -4
- package/lib/config.js +12 -8
- package/lib/constants.js +0 -1
- package/lib/extension/driver-config.js +31 -12
- package/lib/extension/extension-config.js +21 -22
- package/lib/extension/index.js +1 -2
- package/lib/extension/manifest.js +23 -127
- package/lib/extension/package-changed.js +0 -1
- package/lib/extension/plugin-config.js +9 -7
- package/lib/logsink.js +4 -0
- package/lib/main.js +9 -10
- package/lib/schema/arg-spec.js +10 -6
- package/lib/schema/cli-args.js +0 -1
- package/lib/schema/cli-transformers.js +0 -1
- package/lib/schema/keywords.js +0 -1
- package/lib/schema/schema.js +2 -3
- package/lib/utils.js +49 -16
- package/package.json +12 -14
- package/types/appium-manifest.d.ts +61 -0
- package/types/cli.d.ts +134 -0
- package/types/extension.d.ts +56 -0
- package/types/external-manifest.d.ts +58 -0
- package/types/index.d.ts +7 -0
- package/build/lib/appium-config.schema.json +0 -278
- package/build/lib/schema/appium-config-schema.js +0 -251
- package/lib/schema/appium-config-schema.js +0 -287
- package/types/appium-config.d.ts +0 -197
- package/types/types.d.ts +0 -245
|
@@ -0,0 +1,215 @@
|
|
|
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 ExternalDriver = import('@appium/types').ExternalDriver;
|
|
13
|
+
export type W3CCapabilities = import('@appium/types').W3CCapabilities;
|
|
14
|
+
export type DriverData = import('@appium/types').DriverData;
|
|
15
|
+
export type DriverOpts = import('@appium/types').DriverOpts;
|
|
16
|
+
export type Constraints = import('@appium/types').Constraints;
|
|
17
|
+
export type AppiumServer = import('@appium/types').AppiumServer;
|
|
18
|
+
export type ExtensionType = import('../types').ExtensionType;
|
|
19
|
+
export type PluginClass = import('../types/extension').PluginClass;
|
|
20
|
+
export type DriverConfig = import('./extension/driver-config').DriverConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Used by {@linkcode AppiumDriver.createSession } and {@linkcode AppiumDriver.deleteSession } to describe
|
|
23
|
+
* result.
|
|
24
|
+
*/
|
|
25
|
+
export type SessionHandlerResult<V> = {
|
|
26
|
+
value?: V | undefined;
|
|
27
|
+
error?: Error | undefined;
|
|
28
|
+
protocol?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type SessionHandler = import('@appium/types').SessionHandler<SessionHandlerResult<any[]>, SessionHandlerResult<void>>;
|
|
31
|
+
/**
|
|
32
|
+
* @implements {SessionHandler}
|
|
33
|
+
*/
|
|
34
|
+
export class AppiumDriver extends DriverCore implements SessionHandler {
|
|
35
|
+
/**
|
|
36
|
+
* @param {DriverOpts} opts
|
|
37
|
+
*/
|
|
38
|
+
constructor(opts: DriverOpts);
|
|
39
|
+
/**
|
|
40
|
+
* Access to sessions list must be guarded with a Semaphore, because
|
|
41
|
+
* it might be changed by other async calls at any time
|
|
42
|
+
* It is not recommended to access this property directly from the outside
|
|
43
|
+
* @type {Record<string,ExternalDriver>}
|
|
44
|
+
*/
|
|
45
|
+
sessions: Record<string, ExternalDriver>;
|
|
46
|
+
/**
|
|
47
|
+
* Access to pending drivers list must be guarded with a Semaphore, because
|
|
48
|
+
* it might be changed by other async calls at any time
|
|
49
|
+
* It is not recommended to access this property directly from the outside
|
|
50
|
+
* @type {Record<string,ExternalDriver[]>}
|
|
51
|
+
*/
|
|
52
|
+
pendingDrivers: Record<string, ExternalDriver[]>;
|
|
53
|
+
/**
|
|
54
|
+
* List of active plugins
|
|
55
|
+
* @type {PluginClass[]}
|
|
56
|
+
*/
|
|
57
|
+
pluginClasses: PluginClass[];
|
|
58
|
+
/**
|
|
59
|
+
* map of sessions to actual plugin instances per session
|
|
60
|
+
* @type {Record<string,InstanceType<PluginClass>[]>}
|
|
61
|
+
*/
|
|
62
|
+
sessionPlugins: Record<string, InstanceType<PluginClass>[]>;
|
|
63
|
+
/**
|
|
64
|
+
* some commands are sessionless, so we need a set of plugins for them
|
|
65
|
+
* @type {InstanceType<PluginClass>[]}
|
|
66
|
+
*/
|
|
67
|
+
sessionlessPlugins: InstanceType<PluginClass>[];
|
|
68
|
+
/** @type {DriverConfig} */
|
|
69
|
+
driverConfig: DriverConfig;
|
|
70
|
+
/** @type {AppiumServer} */
|
|
71
|
+
server: AppiumServer;
|
|
72
|
+
desiredCapConstraints: Readonly<import("@appium/types").Constraints>;
|
|
73
|
+
args: {
|
|
74
|
+
address: string;
|
|
75
|
+
allowCors: boolean;
|
|
76
|
+
allowInsecure: import("@appium/types").AllowInsecureConfig;
|
|
77
|
+
basePath: string;
|
|
78
|
+
callbackAddress: string | undefined;
|
|
79
|
+
callbackPort: number;
|
|
80
|
+
debugLogSpacing: boolean;
|
|
81
|
+
defaultCapabilities: import("@appium/types").DefaultCapabilitiesConfig | undefined;
|
|
82
|
+
denyInsecure: import("@appium/types").DenyInsecureConfig;
|
|
83
|
+
driver: import("@appium/types").DriverConfig | undefined;
|
|
84
|
+
keepAliveTimeout: number;
|
|
85
|
+
localTimezone: boolean;
|
|
86
|
+
logFile: string | undefined;
|
|
87
|
+
logFilters: import("@appium/types").LogFiltersConfig | undefined;
|
|
88
|
+
loglevel: import("@appium/types").LogLevelConfig;
|
|
89
|
+
logNoColors: boolean;
|
|
90
|
+
logTimestamp: boolean;
|
|
91
|
+
longStacktrace: boolean;
|
|
92
|
+
noPermsCheck: boolean;
|
|
93
|
+
nodeconfig: import("@appium/types").NodeconfigConfig | undefined;
|
|
94
|
+
plugin: import("@appium/types").PluginConfig | undefined;
|
|
95
|
+
port: number;
|
|
96
|
+
relaxedSecurityEnabled: boolean;
|
|
97
|
+
sessionOverride: boolean;
|
|
98
|
+
strictCaps: boolean;
|
|
99
|
+
tmpDir: string | undefined;
|
|
100
|
+
traceDir: string | undefined;
|
|
101
|
+
useDrivers: import("@appium/types").UseDriversConfig;
|
|
102
|
+
usePlugins: import("@appium/types").UsePluginsConfig;
|
|
103
|
+
webhook: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
sessionExists(sessionId: any): boolean;
|
|
106
|
+
driverForSession(sessionId: any): import("@appium/types").ExternalDriver;
|
|
107
|
+
getStatus(): Promise<{
|
|
108
|
+
build: import("../types").BuildInfo;
|
|
109
|
+
}>;
|
|
110
|
+
getSessions(): Promise<{
|
|
111
|
+
id: string;
|
|
112
|
+
capabilities: Partial<import("@wdio/types/build/Capabilities").Capabilities & import("@wdio/types/build/Capabilities").AppiumCapabilities & {
|
|
113
|
+
[x: string]: any;
|
|
114
|
+
}> | undefined;
|
|
115
|
+
}[]>;
|
|
116
|
+
printNewSessionAnnouncement(driverName: any, driverVersion: any, driverBaseVersion: any): void;
|
|
117
|
+
/**
|
|
118
|
+
* Validate and assign CLI args for a driver or plugin
|
|
119
|
+
*
|
|
120
|
+
* If the extension has provided a schema, validation has already happened.
|
|
121
|
+
*
|
|
122
|
+
* Any arg which is equal to its default value will not be assigned to the extension.
|
|
123
|
+
* @param {ExtensionType} extType 'driver' or 'plugin'
|
|
124
|
+
* @param {string} extName the name of the extension
|
|
125
|
+
* @param {Object} extInstance the driver or plugin instance
|
|
126
|
+
*/
|
|
127
|
+
assignCliArgsToExtension(extType: ExtensionType, extName: string, extInstance: any): void;
|
|
128
|
+
/**
|
|
129
|
+
* Create a new session
|
|
130
|
+
* @param {W3CCapabilities} jsonwpCaps JSONWP formatted desired capabilities
|
|
131
|
+
* @param {W3CCapabilities} reqCaps Required capabilities (JSONWP standard)
|
|
132
|
+
* @param {W3CCapabilities} w3cCapabilities W3C capabilities
|
|
133
|
+
* @param {import('@appium/types').DriverData[]} [driverData]
|
|
134
|
+
*/
|
|
135
|
+
createSession(jsonwpCaps: W3CCapabilities, reqCaps: W3CCapabilities, w3cCapabilities: W3CCapabilities, driverData?: import("@appium/types").DriverData[] | undefined): Promise<{
|
|
136
|
+
protocol: any;
|
|
137
|
+
error: any;
|
|
138
|
+
value?: undefined;
|
|
139
|
+
} | {
|
|
140
|
+
protocol: any;
|
|
141
|
+
value: any[];
|
|
142
|
+
error?: undefined;
|
|
143
|
+
}>;
|
|
144
|
+
attachUnexpectedShutdownHandler(driver: any, innerSessionId: any): void;
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
* @param {import('../types/extension').DriverClass} InnerDriver
|
|
148
|
+
* @returns {Promise<DriverData[]>}}
|
|
149
|
+
*/
|
|
150
|
+
curSessionDataForDriver(InnerDriver: BaseDriverBase<import("@appium/types").ExternalDriver, import("../types").ExternalDriverStatic>): Promise<DriverData[]>;
|
|
151
|
+
/**
|
|
152
|
+
* @param {string} sessionId
|
|
153
|
+
*/
|
|
154
|
+
deleteSession(sessionId: string): Promise<{
|
|
155
|
+
protocol: undefined;
|
|
156
|
+
value: void;
|
|
157
|
+
error?: undefined;
|
|
158
|
+
} | {
|
|
159
|
+
protocol: undefined;
|
|
160
|
+
error: any;
|
|
161
|
+
value?: undefined;
|
|
162
|
+
}>;
|
|
163
|
+
deleteAllSessions(opts?: {}): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Get the appropriate plugins for a session (or sessionless plugins)
|
|
166
|
+
*
|
|
167
|
+
* @param {?string} sessionId - the sessionId (or null) to use to find plugins
|
|
168
|
+
* @returns {Array} - array of plugin instances
|
|
169
|
+
*/
|
|
170
|
+
pluginsForSession(sessionId?: string | null): any[];
|
|
171
|
+
/**
|
|
172
|
+
* To get plugins for a command, we either get the plugin instances associated with the
|
|
173
|
+
* particular command's session, or in the case of sessionless plugins, pull from the set of
|
|
174
|
+
* plugin instances reserved for sessionless commands (and we lazily create plugin instances on
|
|
175
|
+
* first use)
|
|
176
|
+
*
|
|
177
|
+
* @param {string} cmd - the name of the command to find a plugin to handle
|
|
178
|
+
* @param {?string} sessionId - the particular session for which to find a plugin, or null if
|
|
179
|
+
* sessionless
|
|
180
|
+
*/
|
|
181
|
+
pluginsToHandleCmd(cmd: string, sessionId?: string | null): any[];
|
|
182
|
+
createPluginInstances(): import("../types").PluginProto[];
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @param {string} cmd
|
|
186
|
+
* @param {...any} args
|
|
187
|
+
* @returns {Promise<{value: any, error?: Error, protocol: string} | import('type-fest').AsyncReturnType<import('@appium/types').Driver['executeCommand']>>}
|
|
188
|
+
*/
|
|
189
|
+
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
190
|
+
wrapCommandWithPlugins({ driver, cmd, args, next, cmdHandledBy, plugins }: {
|
|
191
|
+
driver: any;
|
|
192
|
+
cmd: any;
|
|
193
|
+
args: any;
|
|
194
|
+
next: any;
|
|
195
|
+
cmdHandledBy: any;
|
|
196
|
+
plugins: any;
|
|
197
|
+
}): any;
|
|
198
|
+
logPluginHandlerReport(plugins: any, { cmd, cmdHandledBy }: {
|
|
199
|
+
cmd: any;
|
|
200
|
+
cmdHandledBy: any;
|
|
201
|
+
}): void;
|
|
202
|
+
executeWrappedCommand({ wrappedCmd, protocol }: {
|
|
203
|
+
wrappedCmd: any;
|
|
204
|
+
protocol: any;
|
|
205
|
+
}): Promise<{
|
|
206
|
+
value: any;
|
|
207
|
+
error: any;
|
|
208
|
+
protocol: any;
|
|
209
|
+
}>;
|
|
210
|
+
proxyActive(sessionId: any): boolean;
|
|
211
|
+
getProxyAvoidList(sessionId: any): [string, RegExp][];
|
|
212
|
+
canProxy(sessionId: any): boolean;
|
|
213
|
+
}
|
|
214
|
+
import { DriverCore } from "@appium/base-driver";
|
|
215
|
+
//# sourceMappingURL=appium.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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