appium-chromedriver 8.0.31 → 8.2.0
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/CHANGELOG.md +12 -0
- package/build/lib/chromedriver.d.ts +88 -117
- package/build/lib/chromedriver.d.ts.map +1 -1
- package/build/lib/chromedriver.js +273 -284
- package/build/lib/chromedriver.js.map +1 -1
- package/build/lib/constants.d.ts +18 -18
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js.map +1 -1
- package/build/lib/protocol-helpers.d.ts +14 -13
- package/build/lib/protocol-helpers.d.ts.map +1 -1
- package/build/lib/protocol-helpers.js +13 -12
- package/build/lib/protocol-helpers.js.map +1 -1
- package/build/lib/storage-client/chromelabs.d.ts +15 -15
- package/build/lib/storage-client/chromelabs.d.ts.map +1 -1
- package/build/lib/storage-client/chromelabs.js +15 -19
- package/build/lib/storage-client/chromelabs.js.map +1 -1
- package/build/lib/storage-client/googleapis.d.ts +14 -16
- package/build/lib/storage-client/googleapis.d.ts.map +1 -1
- package/build/lib/storage-client/googleapis.js +25 -41
- package/build/lib/storage-client/googleapis.js.map +1 -1
- package/build/lib/storage-client/storage-client.d.ts +41 -56
- package/build/lib/storage-client/storage-client.d.ts.map +1 -1
- package/build/lib/storage-client/storage-client.js +118 -137
- package/build/lib/storage-client/storage-client.js.map +1 -1
- package/build/lib/utils.d.ts +55 -41
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +51 -54
- package/build/lib/utils.js.map +1 -1
- package/lib/{chromedriver.js → chromedriver.ts} +344 -333
- package/lib/{constants.js → constants.ts} +5 -4
- package/lib/protocol-helpers.ts +44 -0
- package/lib/storage-client/{chromelabs.js → chromelabs.ts} +54 -26
- package/lib/storage-client/{googleapis.js → googleapis.ts} +55 -54
- package/lib/storage-client/{storage-client.js → storage-client.ts} +188 -182
- package/lib/utils.ts +185 -0
- package/package.json +2 -1
- package/lib/protocol-helpers.js +0 -44
- package/lib/utils.js +0 -189
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [8.2.0](https://github.com/appium/appium-chromedriver/compare/v8.1.0...v8.2.0) (2025-12-25)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* Migrate the rest of files to typescript ([#533](https://github.com/appium/appium-chromedriver/issues/533)) ([fbe186f](https://github.com/appium/appium-chromedriver/commit/fbe186f80901f76cd1b4458aca5dd059dceae268))
|
|
6
|
+
|
|
7
|
+
## [8.1.0](https://github.com/appium/appium-chromedriver/compare/v8.0.31...v8.1.0) (2025-12-22)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Migrate storage client modules to typescript ([#532](https://github.com/appium/appium-chromedriver/issues/532)) ([55ef283](https://github.com/appium/appium-chromedriver/commit/55ef2833bc71dda67608eb106783645c4f89922e))
|
|
12
|
+
|
|
1
13
|
## [8.0.31](https://github.com/appium/appium-chromedriver/compare/v8.0.30...v8.0.31) (2025-12-21)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
|
@@ -1,143 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import events from 'events';
|
|
2
|
+
import { JWProxy } from '@appium/base-driver';
|
|
3
|
+
import type { HTTPMethod, HTTPBody } from '@appium/types';
|
|
4
|
+
import type { Request, Response } from 'express';
|
|
5
|
+
import type { ChromedriverOpts } from './types';
|
|
6
|
+
type SessionCapabilities = Record<string, any>;
|
|
7
|
+
export declare class Chromedriver extends events.EventEmitter {
|
|
8
|
+
static readonly EVENT_ERROR = "chromedriver_error";
|
|
9
|
+
static readonly EVENT_CHANGED = "stateChanged";
|
|
10
|
+
static readonly STATE_STOPPED = "stopped";
|
|
11
|
+
static readonly STATE_STARTING = "starting";
|
|
12
|
+
static readonly STATE_ONLINE = "online";
|
|
13
|
+
static readonly STATE_STOPPING = "stopping";
|
|
14
|
+
static readonly STATE_RESTARTING = "restarting";
|
|
15
|
+
private readonly _log;
|
|
16
|
+
private readonly proxyHost;
|
|
17
|
+
private readonly proxyPort;
|
|
18
|
+
private readonly adb?;
|
|
19
|
+
private readonly cmdArgs?;
|
|
20
|
+
private proc;
|
|
21
|
+
private readonly useSystemExecutable;
|
|
22
|
+
private chromedriver?;
|
|
23
|
+
private readonly executableDir;
|
|
24
|
+
private readonly mappingPath?;
|
|
25
|
+
private bundleId?;
|
|
26
|
+
private executableVerified;
|
|
19
27
|
state: string;
|
|
20
|
-
|
|
28
|
+
private readonly _execFunc;
|
|
21
29
|
jwproxy: JWProxy;
|
|
22
|
-
isCustomExecutableDir
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
disableBuildCheck
|
|
26
|
-
|
|
27
|
-
details
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
capabilities: any;
|
|
34
|
-
/** @type {keyof PROTOCOLS | null} */
|
|
35
|
-
_desiredProtocol: ("W3C" | "MJSONWP") | null;
|
|
36
|
-
/** @type {string|null} */
|
|
37
|
-
_driverVersion: string | null;
|
|
38
|
-
/** @type {Record<string, any> | null} */
|
|
39
|
-
_onlineStatus: Record<string, any> | null;
|
|
40
|
-
get log(): import("@appium/types").AppiumLogger;
|
|
41
|
-
/**
|
|
42
|
-
* @returns {string | null}
|
|
43
|
-
*/
|
|
44
|
-
get driverVersion(): string | null;
|
|
45
|
-
getDriversMapping(): Promise<any>;
|
|
46
|
-
/**
|
|
47
|
-
* @param {ChromedriverVersionMapping} mapping
|
|
48
|
-
*/
|
|
49
|
-
getChromedrivers(mapping: ChromedriverVersionMapping): Promise<{
|
|
50
|
-
executable: string;
|
|
51
|
-
version: string;
|
|
52
|
-
minChromeVersion: string | null;
|
|
53
|
-
}[]>;
|
|
54
|
-
getChromeVersion(): Promise<semver.SemVer | null>;
|
|
30
|
+
private readonly isCustomExecutableDir;
|
|
31
|
+
private readonly verbose?;
|
|
32
|
+
private readonly logPath?;
|
|
33
|
+
private readonly disableBuildCheck;
|
|
34
|
+
private readonly storageClient;
|
|
35
|
+
private readonly details?;
|
|
36
|
+
private capabilities;
|
|
37
|
+
private _desiredProtocol;
|
|
38
|
+
private _driverVersion;
|
|
39
|
+
private _onlineStatus;
|
|
40
|
+
constructor(args?: ChromedriverOpts);
|
|
55
41
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @
|
|
58
|
-
* @returns {Promise<void>}
|
|
42
|
+
* Gets the logger instance for this Chromedriver instance.
|
|
43
|
+
* @returns The logger instance.
|
|
59
44
|
*/
|
|
60
|
-
|
|
45
|
+
get log(): any;
|
|
61
46
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* @returns {Promise<string>}
|
|
47
|
+
* Gets the version of the currently running Chromedriver.
|
|
48
|
+
* @returns The driver version string, or null if not yet determined.
|
|
65
49
|
*/
|
|
66
|
-
|
|
67
|
-
initChromedriverPath(): Promise<string>;
|
|
50
|
+
get driverVersion(): string | null;
|
|
68
51
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @returns
|
|
52
|
+
* Starts a new Chromedriver session with the given capabilities.
|
|
53
|
+
* @param caps - The session capabilities to use.
|
|
54
|
+
* @param emitStartingState - Whether to emit the starting state event (default: true).
|
|
55
|
+
* @returns A promise that resolves to the session capabilities returned by Chromedriver.
|
|
56
|
+
* @throws {Error} If Chromedriver fails to start or crashes during startup.
|
|
73
57
|
*/
|
|
74
|
-
|
|
58
|
+
start(caps: SessionCapabilities, emitStartingState?: boolean): Promise<SessionCapabilities>;
|
|
75
59
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @
|
|
78
|
-
* @param {boolean} emitStartingState
|
|
79
|
-
* @returns {Promise<SessionCapabilities>}
|
|
60
|
+
* Gets the current session ID if the driver is online.
|
|
61
|
+
* @returns The session ID string, or null if the driver is not online.
|
|
80
62
|
*/
|
|
81
|
-
start(caps: SessionCapabilities, emitStartingState?: boolean): Promise<SessionCapabilities>;
|
|
82
63
|
sessionId(): string | null;
|
|
83
64
|
/**
|
|
84
|
-
* Restarts the
|
|
85
|
-
*
|
|
86
|
-
* @returns
|
|
65
|
+
* Restarts the Chromedriver session.
|
|
66
|
+
* The session will be stopped and then started again with the same capabilities.
|
|
67
|
+
* @returns A promise that resolves to the session capabilities returned by Chromedriver.
|
|
68
|
+
* @throws {Error} If the driver is not online or if restart fails.
|
|
87
69
|
*/
|
|
88
70
|
restart(): Promise<SessionCapabilities>;
|
|
89
|
-
waitForOnline(): Promise<void>;
|
|
90
|
-
getStatus(): Promise<any>;
|
|
91
71
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @returns
|
|
72
|
+
* Stops the Chromedriver session and terminates the process.
|
|
73
|
+
* @param emitStates - Whether to emit state change events during shutdown (default: true).
|
|
74
|
+
* @returns A promise that resolves when the session has been stopped.
|
|
95
75
|
*/
|
|
96
|
-
startSession(): Promise<SessionCapabilities>;
|
|
97
76
|
stop(emitStates?: boolean): Promise<void>;
|
|
98
77
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @param
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
* @param {string} url
|
|
106
|
-
* @param {'POST'|'GET'|'DELETE'} method
|
|
107
|
-
* @param {any} body
|
|
108
|
-
* @returns
|
|
78
|
+
* Sends a command to the Chromedriver server.
|
|
79
|
+
* @param url - The endpoint URL (e.g., '/url', '/session').
|
|
80
|
+
* @param method - The HTTP method to use ('POST', 'GET', or 'DELETE').
|
|
81
|
+
* @param body - Optional request body for POST requests.
|
|
82
|
+
* @returns A promise that resolves to the response from Chromedriver.
|
|
109
83
|
*/
|
|
110
|
-
sendCommand(url: string, method:
|
|
84
|
+
sendCommand(url: string, method: HTTPMethod, body?: HTTPBody): Promise<HTTPBody>;
|
|
111
85
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @param
|
|
114
|
-
* @param
|
|
86
|
+
* Proxies an HTTP request/response to the Chromedriver server.
|
|
87
|
+
* @param req - The incoming HTTP request object.
|
|
88
|
+
* @param res - The outgoing HTTP response object.
|
|
89
|
+
* @returns A promise that resolves when the proxying is complete.
|
|
115
90
|
*/
|
|
116
|
-
proxyReq(req:
|
|
117
|
-
killAll(): Promise<void>;
|
|
91
|
+
proxyReq(req: Request, res: Response): Promise<void>;
|
|
118
92
|
/**
|
|
119
|
-
*
|
|
93
|
+
* Checks if Chromedriver is currently able to automate webviews.
|
|
94
|
+
* Sometimes Chromedriver stops automating webviews; this method runs a simple
|
|
95
|
+
* command to determine the current state.
|
|
96
|
+
* @returns A promise that resolves to true if webviews are working, false otherwise.
|
|
120
97
|
*/
|
|
121
98
|
hasWorkingWebview(): Promise<boolean>;
|
|
99
|
+
private buildChromedriverArgs;
|
|
100
|
+
private getDriversMapping;
|
|
101
|
+
private getChromedrivers;
|
|
102
|
+
private getChromeVersion;
|
|
103
|
+
private updateDriversMapping;
|
|
104
|
+
private getCompatibleChromedriver;
|
|
105
|
+
private initChromedriverPath;
|
|
106
|
+
private syncProtocol;
|
|
107
|
+
private waitForOnline;
|
|
108
|
+
private getStatus;
|
|
109
|
+
private startSession;
|
|
110
|
+
private changeState;
|
|
111
|
+
private killAll;
|
|
122
112
|
}
|
|
123
|
-
export
|
|
124
|
-
let EVENT_ERROR: string;
|
|
125
|
-
let EVENT_CHANGED: string;
|
|
126
|
-
let STATE_STOPPED: string;
|
|
127
|
-
let STATE_STARTING: string;
|
|
128
|
-
let STATE_ONLINE: string;
|
|
129
|
-
let STATE_STOPPING: string;
|
|
130
|
-
let STATE_RESTARTING: string;
|
|
131
|
-
}
|
|
132
|
-
export type ChromedriverVersionMapping = import("./types").ChromedriverVersionMapping;
|
|
133
|
-
export type NewSessionResponse = {
|
|
134
|
-
capabilities: Record<string, any>;
|
|
135
|
-
};
|
|
136
|
-
export type SessionCapabilities = Record<string, any>;
|
|
137
|
-
import events from 'events';
|
|
138
|
-
import { SubProcess } from 'teen_process';
|
|
139
|
-
import { exec } from 'teen_process';
|
|
140
|
-
import { JWProxy } from '@appium/base-driver';
|
|
141
|
-
import { ChromedriverStorageClient } from './storage-client/storage-client';
|
|
142
|
-
import * as semver from 'semver';
|
|
113
|
+
export {};
|
|
143
114
|
//# sourceMappingURL=chromedriver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../lib/chromedriver.
|
|
1
|
+
{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../lib/chromedriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,OAAO,EAAY,MAAM,qBAAqB,CAAC;AAoBvD,OAAO,KAAK,EAAe,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAC,gBAAgB,EAA6B,MAAM,SAAS,CAAC;AAwB1E,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE/C,qBAAa,YAAa,SAAQ,MAAM,CAAC,YAAY;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,wBAAwB;IACnD,MAAM,CAAC,QAAQ,CAAC,aAAa,kBAAkB;IAC/C,MAAM,CAAC,QAAQ,CAAC,aAAa,aAAa;IAC1C,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAc;IAC5C,MAAM,CAAC,QAAQ,CAAC,YAAY,YAAY;IACxC,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAc;IAC5C,MA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