appium-chromedriver 8.2.28 → 8.2.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/CHANGELOG.md +10 -0
- package/build/lib/chromedriver.d.ts +70 -67
- package/build/lib/chromedriver.d.ts.map +1 -1
- package/build/lib/chromedriver.js +62 -571
- package/build/lib/chromedriver.js.map +1 -1
- package/build/lib/commands/binary.d.ts +28 -0
- package/build/lib/commands/binary.d.ts.map +1 -0
- package/build/lib/commands/binary.js +320 -0
- package/build/lib/commands/binary.js.map +1 -0
- package/build/lib/commands/process.d.ts +18 -0
- package/build/lib/commands/process.d.ts.map +1 -0
- package/build/lib/commands/process.js +118 -0
- package/build/lib/commands/process.js.map +1 -0
- package/build/lib/commands/session.d.ts +31 -0
- package/build/lib/commands/session.d.ts.map +1 -0
- package/build/lib/commands/session.js +137 -0
- package/build/lib/commands/session.js.map +1 -0
- package/build/lib/commands/types.d.ts +32 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/build/lib/commands/version.d.ts +7 -0
- package/build/lib/commands/version.d.ts.map +1 -0
- package/build/lib/commands/version.js +100 -0
- package/build/lib/commands/version.js.map +1 -0
- package/build/lib/constants.d.ts +11 -0
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js +12 -1
- package/build/lib/constants.js.map +1 -1
- package/config/mapping.json +1 -0
- package/lib/chromedriver.ts +100 -685
- package/lib/commands/binary.ts +353 -0
- package/lib/commands/process.ts +114 -0
- package/lib/commands/session.ts +122 -0
- package/lib/commands/types.ts +32 -0
- package/lib/commands/version.ts +74 -0
- package/lib/constants.ts +13 -0
- package/package.json +1 -1
- package/build/lib/protocol-helpers.d.ts +0 -21
- package/build/lib/protocol-helpers.d.ts.map +0 -1
- package/build/lib/protocol-helpers.js +0 -48
- package/build/lib/protocol-helpers.js.map +0 -1
- package/lib/protocol-helpers.ts +0 -51
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [8.2.29](https://github.com/appium/appium-chromedriver/compare/v8.2.28...v8.2.29) (2026-04-24)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* ChromeDriver Bump to v148.0.7778.56 ([#568](https://github.com/appium/appium-chromedriver/issues/568)) ([84b1bb0](https://github.com/appium/appium-chromedriver/commit/84b1bb012ad16c99d40c8d3c2a971298b0fec9e8))
|
|
6
|
+
|
|
7
|
+
### Code Refactoring
|
|
8
|
+
|
|
9
|
+
* Decompose Chromedriver internals ([#565](https://github.com/appium/appium-chromedriver/issues/565)) ([209efa8](https://github.com/appium/appium-chromedriver/commit/209efa82b03d697fd1e81cc4e80238dde7f1de00))
|
|
10
|
+
|
|
1
11
|
## [8.2.28](https://github.com/appium/appium-chromedriver/compare/v8.2.27...v8.2.28) (2026-04-23)
|
|
2
12
|
|
|
3
13
|
### Miscellaneous Chores
|
|
@@ -1,114 +1,117 @@
|
|
|
1
1
|
import events from 'node:events';
|
|
2
|
-
import { JWProxy } from '@appium/base-driver';
|
|
2
|
+
import { JWProxy, PROTOCOLS } from '@appium/base-driver';
|
|
3
|
+
import { SubProcess, exec } from 'teen_process';
|
|
4
|
+
import { ChromedriverStorageClient } from './storage-client/storage-client';
|
|
5
|
+
import { CHROMEDRIVER_EVENTS, CHROMEDRIVER_STATES } from './constants';
|
|
6
|
+
import type { ADB } from 'appium-adb';
|
|
3
7
|
import type { HTTPMethod, HTTPBody } from '@appium/types';
|
|
4
8
|
import type { Request, Response } from 'express';
|
|
5
9
|
import type { ChromedriverOpts } from './types';
|
|
6
10
|
type SessionCapabilities = Record<string, any>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
type ChromedriverState = (typeof CHROMEDRIVER_STATES)[keyof typeof CHROMEDRIVER_STATES];
|
|
12
|
+
type ChromedriverEventMap = {
|
|
13
|
+
[CHROMEDRIVER_EVENTS.ERROR]: [Error];
|
|
14
|
+
[CHROMEDRIVER_EVENTS.CHANGED]: [{
|
|
15
|
+
state: ChromedriverState;
|
|
16
|
+
}];
|
|
17
|
+
};
|
|
18
|
+
export declare class Chromedriver extends events.EventEmitter<ChromedriverEventMap> {
|
|
19
|
+
static readonly EVENT_ERROR: "chromedriver_error";
|
|
20
|
+
static readonly EVENT_CHANGED: "stateChanged";
|
|
21
|
+
static readonly STATE_STOPPED: "stopped";
|
|
22
|
+
static readonly STATE_STARTING: "starting";
|
|
23
|
+
static readonly STATE_ONLINE: "online";
|
|
24
|
+
static readonly STATE_STOPPING: "stopping";
|
|
25
|
+
static readonly STATE_RESTARTING: "restarting";
|
|
15
26
|
private readonly _log;
|
|
16
27
|
private readonly proxyHost;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
readonly proxyPort: number;
|
|
29
|
+
readonly adb?: ADB;
|
|
30
|
+
readonly cmdArgs?: string[];
|
|
31
|
+
proc: SubProcess | null;
|
|
32
|
+
readonly useSystemExecutable: boolean;
|
|
33
|
+
chromedriver?: string;
|
|
34
|
+
readonly executableDir: string;
|
|
35
|
+
readonly mappingPath?: string;
|
|
36
|
+
bundleId?: string;
|
|
37
|
+
executableVerified: boolean;
|
|
27
38
|
state: string;
|
|
28
|
-
|
|
39
|
+
_execFunc: typeof exec;
|
|
29
40
|
jwproxy: JWProxy;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
readonly isCustomExecutableDir: boolean;
|
|
42
|
+
readonly verbose?: boolean;
|
|
43
|
+
readonly logPath?: string;
|
|
44
|
+
readonly disableBuildCheck: boolean;
|
|
45
|
+
readonly storageClient: ChromedriverStorageClient | null;
|
|
46
|
+
readonly details?: ChromedriverOpts['details'];
|
|
47
|
+
capabilities: SessionCapabilities;
|
|
48
|
+
_desiredProtocol: keyof typeof PROTOCOLS | null;
|
|
49
|
+
_driverVersion: string | null;
|
|
50
|
+
_onlineStatus: Record<string, any> | null;
|
|
40
51
|
constructor(args?: ChromedriverOpts);
|
|
41
|
-
/**
|
|
42
|
-
* Gets the logger instance for this Chromedriver instance.
|
|
43
|
-
* @returns The logger instance.
|
|
44
|
-
*/
|
|
45
52
|
get log(): any;
|
|
46
|
-
/**
|
|
47
|
-
* Gets the version of the currently running Chromedriver.
|
|
48
|
-
* @returns The driver version string, or null if not yet determined.
|
|
49
|
-
*/
|
|
50
53
|
get driverVersion(): string | null;
|
|
51
54
|
/**
|
|
52
55
|
* Starts a new Chromedriver session with the given capabilities.
|
|
53
|
-
*
|
|
54
|
-
* @param
|
|
55
|
-
* @
|
|
56
|
-
* @
|
|
56
|
+
*
|
|
57
|
+
* @param caps - Capabilities passed to Chromedriver session creation.
|
|
58
|
+
* @param emitStartingState - Whether to emit the `starting` state transition.
|
|
59
|
+
* @returns Session capabilities returned by Chromedriver.
|
|
57
60
|
*/
|
|
58
61
|
start(caps: SessionCapabilities, emitStartingState?: boolean): Promise<SessionCapabilities>;
|
|
59
62
|
/**
|
|
60
|
-
* Gets
|
|
61
|
-
*
|
|
63
|
+
* Gets active Chromedriver session id if the driver is online.
|
|
64
|
+
*
|
|
65
|
+
* @returns The session id or `null` when driver is not online.
|
|
62
66
|
*/
|
|
63
67
|
sessionId(): string | null;
|
|
64
68
|
/**
|
|
65
|
-
* Restarts
|
|
66
|
-
*
|
|
67
|
-
* @returns
|
|
68
|
-
* @throws {Error} If the driver is not online or if restart fails.
|
|
69
|
+
* Restarts current Chromedriver session with previously stored capabilities.
|
|
70
|
+
*
|
|
71
|
+
* @returns Session capabilities returned by the restarted session.
|
|
69
72
|
*/
|
|
70
73
|
restart(): Promise<SessionCapabilities>;
|
|
71
74
|
/**
|
|
72
|
-
* Stops the Chromedriver session and
|
|
73
|
-
*
|
|
74
|
-
* @
|
|
75
|
+
* Stops the current Chromedriver session and underlying subprocess.
|
|
76
|
+
*
|
|
77
|
+
* @param emitStates - Whether to emit stopping/stopped state transitions.
|
|
75
78
|
*/
|
|
76
79
|
stop(emitStates?: boolean): Promise<void>;
|
|
77
80
|
/**
|
|
78
|
-
* Sends a command to the
|
|
79
|
-
*
|
|
80
|
-
* @param
|
|
81
|
-
* @param
|
|
82
|
-
* @
|
|
81
|
+
* Sends a direct command to Chromedriver through the JSONWP/W3C proxy.
|
|
82
|
+
*
|
|
83
|
+
* @param url - Chromedriver endpoint path.
|
|
84
|
+
* @param method - HTTP method used for the command.
|
|
85
|
+
* @param body - Optional request payload.
|
|
86
|
+
* @returns Command response payload.
|
|
83
87
|
*/
|
|
84
88
|
sendCommand(url: string, method: HTTPMethod, body?: HTTPBody): Promise<HTTPBody>;
|
|
85
89
|
/**
|
|
86
|
-
* Proxies an
|
|
87
|
-
*
|
|
88
|
-
* @param
|
|
89
|
-
* @
|
|
90
|
+
* Proxies an incoming Express request/response pair to Chromedriver.
|
|
91
|
+
*
|
|
92
|
+
* @param req - Incoming request object.
|
|
93
|
+
* @param res - Outgoing response object.
|
|
90
94
|
*/
|
|
91
95
|
proxyReq(req: Request, res: Response): Promise<void>;
|
|
92
96
|
/**
|
|
93
|
-
* Checks
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @returns A promise that resolves to true if webviews are working, false otherwise.
|
|
97
|
+
* Checks whether the active webview connection is currently responsive.
|
|
98
|
+
*
|
|
99
|
+
* @returns `true` if `/url` command succeeds, otherwise `false`.
|
|
97
100
|
*/
|
|
98
101
|
hasWorkingWebview(): Promise<boolean>;
|
|
99
102
|
private buildChromedriverArgs;
|
|
100
103
|
private getDriversMapping;
|
|
101
104
|
private getChromedrivers;
|
|
102
|
-
private getChromeVersion;
|
|
103
105
|
private updateDriversMapping;
|
|
104
106
|
private getCompatibleChromedriver;
|
|
105
107
|
private initChromedriverPath;
|
|
108
|
+
private getChromeVersion;
|
|
106
109
|
private syncProtocol;
|
|
107
110
|
private waitForOnline;
|
|
108
111
|
private getStatus;
|
|
109
|
-
private startSession;
|
|
110
|
-
private changeState;
|
|
111
112
|
private killAll;
|
|
113
|
+
private changeState;
|
|
114
|
+
private startSession;
|
|
112
115
|
}
|
|
113
116
|
export {};
|
|
114
117
|
//# sourceMappingURL=chromedriver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../lib/chromedriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../lib/chromedriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAWrE,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AACpC,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,EAAC,MAAM,SAAS,CAAC;AAI9C,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC/C,KAAK,iBAAiB,GAAG,CAAC,OAAO,mB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