browser-commander 0.23.0 → 0.25.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/.jscpd-baseline.json +48 -30
- package/CHANGELOG.md +32 -0
- package/README.md +19 -7
- package/eslint.config.js +1 -1
- package/examples/react-test-app/package-lock.json +890 -0
- package/examples/react-test-app/package.json +4 -4
- package/package.json +20 -17
- package/src/browser/attach/snapshot.js +4 -28
- package/src/browser/browser-cookie-credentials.js +15 -8
- package/src/browser/browser-cookies.js +36 -30
- package/src/browser/browser-profile-files.js +31 -0
- package/src/browser/browser-profiles.js +11 -13
- package/src/browser/browser-sources.js +39 -9
- package/src/browser/browser-sources.json +600 -23
- package/src/browser/connector.js +46 -4
- package/src/browser/launcher.js +26 -1
- package/src/browser/migration/capabilities.json +117 -0
- package/src/browser/migration/chromium-history.sql +22 -0
- package/src/browser/migration/chromium-writers.js +85 -0
- package/src/browser/migration/cookies.js +4 -1
- package/src/browser/migration/data-classes.js +68 -0
- package/src/browser/migration/domains.js +32 -0
- package/src/browser/migration/firefox-history.js +106 -0
- package/src/browser/migration/firefox.js +39 -25
- package/src/browser/migration/history.js +161 -2
- package/src/browser/migration/index.js +229 -83
- package/src/browser/migration/os-crypt-keys.js +1 -5
- package/src/browser/migration/password-metadata.js +95 -0
- package/src/browser/migration/passwords.js +78 -41
- package/src/browser/migration/safari-import.js +100 -0
- package/src/browser/migration/safari.js +110 -0
- package/src/browser/migration/sqlite-snapshot.js +31 -65
- package/src/browser/migration/validation.js +48 -0
- package/src/browser/real-browser.js +21 -3
- package/src/browser/safari-access.js +45 -0
- package/src/browser/safari-cookies.js +39 -36
- package/src/browser/safari-profiles.js +83 -0
- package/src/browser/storage-state.js +27 -0
- package/src/browser/system-browser.js +31 -143
- package/src/browser/webdriver.js +18 -2
- package/src/cli/args.js +7 -0
- package/src/cli/commands.js +12 -6
- package/src/cli/handle-methods.js +19 -2
- package/src/cli/high-level-methods.js +22 -3
- package/src/cli/modules.js +5 -1
- package/src/cli/sessions.js +14 -2
- package/src/tests/index.js +1 -0
- package/tests/e2e/engine-matrix.e2e.test.js +107 -0
- package/tests/e2e/playwright.e2e.test.js +11 -17
- package/tests/e2e/puppeteer.e2e.test.js +13 -17
- package/tests/unit/browser/attach/snapshot.test.js +30 -0
- package/tests/unit/browser/browser-cookies.test.js +35 -0
- package/tests/unit/browser/catalogue-launch.test.js +93 -0
- package/tests/unit/browser/cookie-sources.test.js +92 -17
- package/tests/unit/browser/credential-catalogue.test.js +50 -0
- package/tests/unit/browser/firefox-cookie-expiry.test.js +79 -0
- package/tests/unit/browser/migration/data-classes.test.js +89 -0
- package/tests/unit/browser/migration/domain-isolation.test.js +212 -0
- package/tests/unit/browser/migration/firefox-history.test.js +130 -0
- package/tests/unit/browser/migration/history-metadata.test.js +74 -0
- package/tests/unit/browser/migration/index.test.js +16 -1
- package/tests/unit/browser/migration/opera-keys.test.js +22 -0
- package/tests/unit/browser/migration/safari-data.test.js +143 -0
- package/tests/unit/browser/migration/sqlite-snapshot.test.js +56 -1
- package/tests/unit/browser/migration/validation.test.js +63 -0
- package/tests/unit/browser/migration/yandex.test.js +84 -0
- package/tests/unit/browser/real-browser.test.js +19 -0
- package/tests/unit/browser/safari-cookies.test.js +26 -1
- package/tests/unit/browser/safari-profiles.test.js +111 -0
- package/tests/unit/cli/dispatcher.test.js +6 -2
- package/tests/unit/cli/main.test.js +5 -0
- package/tests/unit/cli/selenium-parity.test.js +186 -0
- package/tests/unit/scripts/browser-support.test.js +14 -7
- package/tests/unit/scripts/check-pipeline-status.test.js +33 -1
- package/tests/unit/scripts/migration-support.test.js +31 -0
- package/tests/unit/tests/index.test.js +2 -1
- package/tests/unit/traces/links.test.js +2 -2
package/.jscpd-baseline.json
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
"04b28d01d0bb47dc": 1,
|
|
9
9
|
"04f605be138bc350": 1,
|
|
10
10
|
"0796d358ad2562c3": 1,
|
|
11
|
+
"08e28c7706cdddd6": 1,
|
|
11
12
|
"090a69d9528e4cdb": 1,
|
|
12
13
|
"09694dc8fb9d683c": 1,
|
|
13
14
|
"0a3459aad03492bb": 1,
|
|
15
|
+
"0ae281facb3c28dd": 1,
|
|
14
16
|
"0b48b63049c42591": 1,
|
|
15
17
|
"0b8c71391c107a5e": 1,
|
|
16
18
|
"0ba2d165b56db0b3": 1,
|
|
@@ -18,19 +20,18 @@
|
|
|
18
20
|
"0caa402c4eae32d8": 1,
|
|
19
21
|
"0fd23be8410c2c95": 1,
|
|
20
22
|
"0fe4f3b5e5e939b3": 1,
|
|
21
|
-
"
|
|
22
|
-
"119f429fe4d23e4a": 1,
|
|
23
|
+
"126a1cfe8f2264ce": 1,
|
|
23
24
|
"1273365073edd790": 1,
|
|
24
|
-
"1296adc3c3128048": 1,
|
|
25
25
|
"13c4b58d3ea0719b": 1,
|
|
26
26
|
"14beedf656e57fba": 1,
|
|
27
27
|
"150c8efe188ac225": 1,
|
|
28
28
|
"16340a16ed52849e": 1,
|
|
29
|
+
"16e58ea67d8ef4e8": 1,
|
|
29
30
|
"17c26c0db2d35ad1": 1,
|
|
30
31
|
"193b46c0e7f72053": 1,
|
|
32
|
+
"19ff70fc80fad524": 1,
|
|
31
33
|
"1ad4dc7e19a77f68": 1,
|
|
32
34
|
"1c1baf1bc8ea0eae": 1,
|
|
33
|
-
"1cbd39b416a2b94b": 1,
|
|
34
35
|
"1d61f5c49f12d2dc": 1,
|
|
35
36
|
"1ef570563d4e5a08": 1,
|
|
36
37
|
"1f2104c950b12a30": 1,
|
|
@@ -39,10 +40,11 @@
|
|
|
39
40
|
"22755b35701c5bb6": 1,
|
|
40
41
|
"2296c06fa00da254": 1,
|
|
41
42
|
"229b903386b17538": 1,
|
|
43
|
+
"22cbd954358d25f8": 1,
|
|
44
|
+
"230bfe57cfda164d": 1,
|
|
42
45
|
"2357ae472525f6bf": 1,
|
|
43
46
|
"2394170c8a2a0e9a": 1,
|
|
44
47
|
"23d2486c0e269b77": 1,
|
|
45
|
-
"24b29d9d78441dbd": 1,
|
|
46
48
|
"266893ea7a511fe4": 1,
|
|
47
49
|
"266b9cb95f783cdf": 1,
|
|
48
50
|
"26bb09996580437c": 1,
|
|
@@ -53,27 +55,28 @@
|
|
|
53
55
|
"2c0f8b5c6f28420b": 1,
|
|
54
56
|
"2d2d6fd6c7c0f30d": 1,
|
|
55
57
|
"2e70be24d2268673": 1,
|
|
56
|
-
"
|
|
58
|
+
"2e75ebb5fafa33a5": 1,
|
|
57
59
|
"2f9e15467cc2f12a": 1,
|
|
58
60
|
"30da9d4e83f1c939": 1,
|
|
59
61
|
"3101802d3ea65339": 1,
|
|
62
|
+
"326f1ff9016e1e37": 1,
|
|
60
63
|
"33357ce94e07cc4b": 1,
|
|
61
64
|
"35cf2769645f3234": 1,
|
|
62
65
|
"37bd4114d0089f49": 1,
|
|
63
|
-
"
|
|
66
|
+
"39cf8134a7fdaa31": 1,
|
|
64
67
|
"3a9f1672ecc1d55b": 1,
|
|
65
68
|
"3adca52a3f04837c": 1,
|
|
66
69
|
"3c1017def7b3216c": 1,
|
|
67
|
-
"
|
|
68
|
-
"3dced48baf70eb36": 1,
|
|
70
|
+
"3c5cb4b62d3739e3": 1,
|
|
69
71
|
"3fa2ebbb416120f0": 1,
|
|
70
72
|
"3fe61c0a7772f18b": 1,
|
|
71
73
|
"406fed8e5b39aafd": 1,
|
|
72
74
|
"40aa2953f783819c": 1,
|
|
73
75
|
"418db56376cc23bd": 1,
|
|
76
|
+
"421bb16fafde32a7": 1,
|
|
74
77
|
"441570d51d6f70a4": 1,
|
|
75
78
|
"457c71f32f53833d": 1,
|
|
76
|
-
"
|
|
79
|
+
"4715a17d690865ee": 1,
|
|
77
80
|
"4b0d3cc5c27227e7": 1,
|
|
78
81
|
"4c3b94caa28045d0": 1,
|
|
79
82
|
"4e090d6bb30e6551": 1,
|
|
@@ -84,29 +87,28 @@
|
|
|
84
87
|
"520a28ee2ced56c2": 1,
|
|
85
88
|
"53519ec61a6ba319": 1,
|
|
86
89
|
"53f7e3f3e444a37d": 1,
|
|
87
|
-
"
|
|
90
|
+
"55fd990468b1fd0f": 1,
|
|
88
91
|
"562ebfb882d4aa8f": 1,
|
|
89
92
|
"56b5df15ee61887d": 1,
|
|
90
93
|
"56b7675e4ce57335": 1,
|
|
91
|
-
"56d45d447baad2fd": 1,
|
|
92
94
|
"56deee57166c4369": 1,
|
|
93
95
|
"578ab1469dc998ec": 1,
|
|
96
|
+
"57aa3b487de27c90": 1,
|
|
94
97
|
"57c410b183671eec": 1,
|
|
95
|
-
"
|
|
98
|
+
"5825f31d55b82fae": 1,
|
|
96
99
|
"58c08b8242c875ec": 1,
|
|
97
100
|
"58c1ca12d4d2b50f": 1,
|
|
98
101
|
"5a09e2677334ba05": 1,
|
|
99
|
-
"
|
|
100
|
-
"
|
|
102
|
+
"5b5d3f792532356c": 1,
|
|
103
|
+
"5ba2f3218754f04c": 1,
|
|
104
|
+
"60052da86e7bb241": 1,
|
|
101
105
|
"608e1dd27138ec6f": 1,
|
|
102
|
-
"6098544c77ff17a2": 1,
|
|
103
106
|
"60d0c58a01fc8746": 1,
|
|
104
107
|
"61ae5da6cc003836": 1,
|
|
105
108
|
"61bcadcd8dc9f63e": 1,
|
|
106
109
|
"63ff613b1780c67a": 1,
|
|
107
110
|
"642cc89ed49f8a21": 1,
|
|
108
111
|
"6479c3604c153ec4": 1,
|
|
109
|
-
"6699064d6e8e09ba": 1,
|
|
110
112
|
"66fb97eebd7ff0dc": 1,
|
|
111
113
|
"67a95e428b8fa31c": 1,
|
|
112
114
|
"6880d620e0e67229": 1,
|
|
@@ -127,7 +129,7 @@
|
|
|
127
129
|
"760d9925f6e3ca85": 1,
|
|
128
130
|
"7623a3eea4680be4": 1,
|
|
129
131
|
"771db68809cce310": 1,
|
|
130
|
-
"
|
|
132
|
+
"77793566535b942e": 1,
|
|
131
133
|
"779517ed59b39aa6": 1,
|
|
132
134
|
"7850ccac58d09216": 1,
|
|
133
135
|
"785d557d0683185b": 1,
|
|
@@ -137,78 +139,90 @@
|
|
|
137
139
|
"799dc9940577a15e": 1,
|
|
138
140
|
"79e705499ddaf44b": 1,
|
|
139
141
|
"7e6bad380644f9b0": 1,
|
|
142
|
+
"80cc77491cde09e5": 1,
|
|
143
|
+
"80f564fe45f6b315": 1,
|
|
140
144
|
"81a56c10bfd42e39": 1,
|
|
141
145
|
"837ba752ecdaf052": 1,
|
|
142
|
-
"8549c997a472cb6c": 1,
|
|
143
146
|
"86646647aab19e39": 1,
|
|
144
147
|
"8678919f1350f154": 1,
|
|
145
148
|
"86aae81b1aa0d21b": 1,
|
|
146
149
|
"87484a2744e09748": 1,
|
|
147
|
-
"876d2c8edfc8c40a": 1,
|
|
148
150
|
"8b013ac20e436d76": 1,
|
|
149
151
|
"8c2b1408886c1db1": 1,
|
|
152
|
+
"8e55579a412bc058": 1,
|
|
150
153
|
"8ec18cdbd4a96518": 1,
|
|
154
|
+
"901317bc4d7d30d0": 1,
|
|
151
155
|
"91049efadc65169b": 1,
|
|
152
156
|
"9134185980de8a17": 1,
|
|
153
157
|
"916833bafca4fa63": 1,
|
|
154
158
|
"91a538e4a0c28f25": 1,
|
|
155
159
|
"92ddafa7e65be7eb": 1,
|
|
156
160
|
"94821a4d1b745dfd": 1,
|
|
161
|
+
"961e3cc731bbc9fe": 1,
|
|
157
162
|
"97c5a112fdde7be8": 1,
|
|
158
163
|
"990d87f21678fa96": 1,
|
|
159
164
|
"9a72b1c2f22156ca": 1,
|
|
160
165
|
"9b6ef4df04562546": 1,
|
|
161
|
-
"
|
|
166
|
+
"9e049e3eefca1869": 1,
|
|
162
167
|
"9fbb8296259dedbe": 1,
|
|
168
|
+
"9fe73b5b918293fe": 1,
|
|
163
169
|
"a0183465782b0b15": 1,
|
|
170
|
+
"a11079d40b28716c": 1,
|
|
171
|
+
"a133391f90bd1a28": 1,
|
|
164
172
|
"a1e3a3a13b27dba4": 1,
|
|
165
173
|
"a1ef39a15701c2b5": 1,
|
|
166
174
|
"a2a00d268fb2cee4": 1,
|
|
167
|
-
"
|
|
175
|
+
"a36f66312d5bfbf8": 1,
|
|
168
176
|
"a4c8498d4f2d2191": 1,
|
|
177
|
+
"a5298242b5439858": 1,
|
|
169
178
|
"a6ad7ab6c05656dc": 1,
|
|
170
179
|
"a6ffab1aacd00af6": 1,
|
|
171
180
|
"a78d76908162699e": 1,
|
|
172
181
|
"a9bd4ffef6da5faf": 1,
|
|
173
|
-
"a9d71c2e50f1b832": 1,
|
|
174
182
|
"acc95d694eb2f581": 1,
|
|
175
183
|
"ad4cfa76daa1b6fc": 1,
|
|
176
184
|
"ad50b48938af8aef": 1,
|
|
177
|
-
"adae1329361a81a1": 1,
|
|
178
185
|
"ae477ba64bafba3f": 1,
|
|
179
186
|
"aee1e5c65f783848": 1,
|
|
180
187
|
"aee45e8b58c2d87f": 1,
|
|
181
188
|
"af702b20ebd45ef2": 1,
|
|
182
189
|
"af9d6a2f4eba146e": 1,
|
|
183
190
|
"b010686af23efa90": 1,
|
|
184
|
-
"b2a0686231220c8a": 1,
|
|
185
191
|
"b35ff46c365dcd18": 1,
|
|
186
192
|
"b41581af204af40e": 1,
|
|
187
193
|
"b71fa5250da28739": 1,
|
|
188
194
|
"b740ecac685a15fe": 1,
|
|
189
195
|
"b8c2d21f2a26f77d": 1,
|
|
196
|
+
"ba675900dc4211b1": 1,
|
|
190
197
|
"bb269582b94ed42d": 1,
|
|
191
198
|
"bb3e6d0f7e7edccd": 1,
|
|
199
|
+
"bb5b0c8d22c9667a": 1,
|
|
192
200
|
"bc9115be3a462930": 1,
|
|
193
201
|
"bd0ae42c13d5b4f9": 1,
|
|
194
|
-
"
|
|
202
|
+
"bd17b166d89cb709": 1,
|
|
195
203
|
"bdb8ca169be36b80": 1,
|
|
196
204
|
"bdcd11c2bfb5fde0": 1,
|
|
197
205
|
"be0900fb3e87164e": 1,
|
|
198
206
|
"bf452b9431c092ad": 1,
|
|
199
207
|
"c0b027bebd7bd737": 1,
|
|
200
208
|
"c189fe5122a7dc91": 1,
|
|
209
|
+
"c225b9d7d519303e": 1,
|
|
201
210
|
"c2c155adbcb46f3c": 1,
|
|
202
211
|
"c30737d62069fc02": 1,
|
|
212
|
+
"c32010db539b4efb": 1,
|
|
203
213
|
"c3c3569357673af8": 1,
|
|
204
214
|
"c415ffcd004d6518": 1,
|
|
205
215
|
"c461a83b51eb7740": 1,
|
|
216
|
+
"c5c202c5db4dd601": 1,
|
|
217
|
+
"c714beebc66381dd": 1,
|
|
206
218
|
"c9cf3c28bed33a5b": 1,
|
|
219
|
+
"ca7e08d1eec2ad8c": 1,
|
|
207
220
|
"cab590a1d04b5a05": 1,
|
|
208
221
|
"cbd444e9a6a9072e": 1,
|
|
209
222
|
"cebff7d1cc87f646": 1,
|
|
210
|
-
"
|
|
223
|
+
"cfc928aa393146b6": 1,
|
|
211
224
|
"cfd68135b744c27b": 1,
|
|
225
|
+
"cfdc0cca50233fcb": 1,
|
|
212
226
|
"d016035b3bf3340c": 1,
|
|
213
227
|
"d097f41a6f43e634": 1,
|
|
214
228
|
"d0da8714c4b7de30": 1,
|
|
@@ -220,26 +234,27 @@
|
|
|
220
234
|
"d6157a86fea41907": 1,
|
|
221
235
|
"d6fa9884eee815f0": 1,
|
|
222
236
|
"d86bafb915488255": 1,
|
|
237
|
+
"da2c10a66acdb52f": 1,
|
|
238
|
+
"dabb9fc09638e178": 1,
|
|
223
239
|
"de0bf2317c53d427": 1,
|
|
224
240
|
"de1b481bfe8c3e58": 1,
|
|
225
241
|
"df2dc922f40485e7": 1,
|
|
226
242
|
"df3b85f6947db144": 1,
|
|
227
|
-
"e0b90bce5112bb9c": 1,
|
|
228
243
|
"e2ef7800deb0f464": 1,
|
|
229
244
|
"e3111b845acb7a0e": 1,
|
|
230
|
-
"e4b10b56d7e1edac": 1,
|
|
231
245
|
"e59733bafda785e9": 1,
|
|
232
246
|
"e5feedc0c24e103e": 1,
|
|
233
247
|
"e67726a913675120": 1,
|
|
248
|
+
"e686288f2e9b8a6d": 1,
|
|
234
249
|
"ea1195048ded896c": 1,
|
|
235
250
|
"ea88711c5deb1fe5": 1,
|
|
236
251
|
"eb9a70c2a21094ff": 1,
|
|
237
252
|
"ebe03c5f8c2f5147": 1,
|
|
238
253
|
"ee19c8b9b332ee98": 1,
|
|
239
254
|
"eeca0ccf8d821f21": 1,
|
|
240
|
-
"ef2fc2e92ac07c6e": 1,
|
|
241
255
|
"f022b763ff342b2d": 1,
|
|
242
256
|
"f07f979f8c2706e8": 1,
|
|
257
|
+
"f186f73c118b8e8a": 1,
|
|
243
258
|
"f38f72095a67c95e": 1,
|
|
244
259
|
"f40ba84763547f41": 1,
|
|
245
260
|
"f46509ed693574df": 1,
|
|
@@ -248,10 +263,13 @@
|
|
|
248
263
|
"f6678d6748e9c902": 1,
|
|
249
264
|
"f67a07a611f39cb2": 1,
|
|
250
265
|
"f7b1f9d699bcd580": 1,
|
|
266
|
+
"f81e07af5d3a1c3c": 1,
|
|
267
|
+
"f904844f89cab699": 1,
|
|
251
268
|
"f911821aa7dda47f": 1,
|
|
252
269
|
"f97bf515bfd95829": 1,
|
|
253
270
|
"fae844842fba705b": 1,
|
|
254
271
|
"faf76ec43b2dbbaa": 1,
|
|
272
|
+
"fc0d7bde0033411d": 1,
|
|
255
273
|
"fc6ed7d760c98f51": 1,
|
|
256
274
|
"fccfd8b004c12dd4": 1,
|
|
257
275
|
"fe859df9f97c75d4": 1
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4a79d62: Import Safari bookmarks, history and explicit Passwords CSV exports into Chromium profiles. Discover named Safari profiles and modern WebKit cookie stores. Derive desktop browser executable discovery and profile protection from the shared catalogue, fix Opera Local State lookup, and report Yandex Ya Passman encryption limitations. Enforce domain boundaries for migrated cookies, history and passwords, and validate migration paths and options before writing.
|
|
8
|
+
|
|
9
|
+
Resolve native Safe Storage credentials from the catalogue and provide service-specific macOS Keychain retry guidance. SQLite stores that cannot be backed up consistently return close-browser/retry guidance instead of copying live database files.
|
|
10
|
+
|
|
11
|
+
Match exact hosts and subdomains in cookie-source metadata and automatic source selection, without decoding cookie values or treating domain strings as SQL wildcard patterns.
|
|
12
|
+
|
|
13
|
+
Keep Safari profile-catalogue errors alongside readable profiles and cookie sources, including domain-filtered listings.
|
|
14
|
+
|
|
15
|
+
Filter associated Login Data notes, security records and origin statistics; re-encrypt retained notes with the target key. Reset copied sync state and report unknown metadata omitted during domain-filtered imports.
|
|
16
|
+
|
|
17
|
+
Recognize all 18 migration data classes with explicit unsupported reports. Add separate payment-card consent across native APIs, pre-launch migration, CLI and command streams, plus provider-specific passkey and certificate export limitations without accessing protected stores.
|
|
18
|
+
|
|
19
|
+
Translate Firefox history to Chromium with exact microsecond visit dates, domain filtering, immutable snapshots and per-visit malformed-data reports.
|
|
20
|
+
|
|
21
|
+
Normalize Firefox schema 16+ cookie expiry from milliseconds to seconds in both installed-profile reading and migration, preserving legacy schemas and session markers.
|
|
22
|
+
|
|
23
|
+
Preserve supported Yandex Login Data imports when an unsupported Ya Passman Data store is present, retaining separate encryption diagnostics.
|
|
24
|
+
|
|
25
|
+
Omit derived cluster labels, keywords, duplicate-visit records and unknown History metadata with named warnings during domain-filtered imports; preserve them during unfiltered imports.
|
|
26
|
+
|
|
27
|
+
## 0.24.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- 31d2387: Support Selenium through the common launch, connection, CLI, and browser-test
|
|
32
|
+
APIs, including raw WebDriver handles and generic engine constructors. Refresh
|
|
33
|
+
all direct dependencies and generated engine APIs to the latest stable releases.
|
|
34
|
+
|
|
3
35
|
## 0.23.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Browser Commander
|
|
2
2
|
|
|
3
|
-
A universal browser automation library for JavaScript/TypeScript that supports
|
|
3
|
+
A universal browser automation library for JavaScript/TypeScript that supports Playwright, Puppeteer, and Selenium with a unified API. The key focus is on **stoppable page triggers** - ensuring automation logic is properly mounted/unmounted during page navigation.
|
|
4
|
+
|
|
5
|
+
See [engine support and native/CLI defaults](../docs/engine-support.md) for the
|
|
6
|
+
cross-language API matrix and Selenium examples.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
@@ -222,7 +225,7 @@ await saveStorageState(page, './gmail-state.json');
|
|
|
222
225
|
`browser-commander/tests` adds browser fixtures and scheduling helpers on top of
|
|
223
226
|
[`test-anywhere`](https://github.com/link-foundation/test-anywhere). It keeps
|
|
224
227
|
tests portable across Node.js, Bun, and Deno while running the same browser
|
|
225
|
-
scenario against Playwright and
|
|
228
|
+
scenario against Playwright, Puppeteer, and Selenium.
|
|
226
229
|
|
|
227
230
|
```javascript
|
|
228
231
|
import { assert, browserTest } from 'browser-commander/tests';
|
|
@@ -459,7 +462,7 @@ const session = await launchRealBrowser({
|
|
|
459
462
|
browser: 'chrome', // chrome | edge | brave | chromium | firefox
|
|
460
463
|
profile: 'Default',
|
|
461
464
|
include: ['cookies', 'bookmarks', 'history', 'passwords', 'preferences'],
|
|
462
|
-
domains: ['npmjs.com', 'github.com'], // optional
|
|
465
|
+
domains: ['npmjs.com', 'github.com'], // optional cookies/history/passwords filter
|
|
463
466
|
},
|
|
464
467
|
});
|
|
465
468
|
console.log(session.migration.migrated, session.migration.skipped);
|
|
@@ -467,6 +470,12 @@ console.log(session.migration.migrated, session.migration.skipped);
|
|
|
467
470
|
|
|
468
471
|
### launchWebDriver(options) / connectWebDriver(options)
|
|
469
472
|
|
|
473
|
+
The same engine is available through `launchBrowser({engine: 'selenium'})` and
|
|
474
|
+
`connectBrowser({engine: 'selenium', serverUrl, capabilities})`. The common
|
|
475
|
+
launcher defaults to a real Chrome attachment; `launch: 'engine'` enables
|
|
476
|
+
ChromeDriver/GeckoDriver-managed Chrome or Firefox launches. Both return a common
|
|
477
|
+
page facade plus a raw `driver` and `close()`.
|
|
478
|
+
|
|
470
479
|
The `selenium` engine drives Chrome or Firefox over W3C WebDriver through
|
|
471
480
|
`selenium-webdriver` (an optional peer dependency). `launchWebDriver()` finds a
|
|
472
481
|
driver (`driverPath`, then `PATH`, then the Selenium Manager bundled with
|
|
@@ -515,9 +524,12 @@ overrides and managed downloads need CDP and throw on this engine; see
|
|
|
515
524
|
|
|
516
525
|
### listBrowserProfiles(options)
|
|
517
526
|
|
|
518
|
-
Discover
|
|
527
|
+
Discover profiles for the browsers in the shared catalogue, including Safari.
|
|
519
528
|
Pass an optional `browser` to narrow discovery. Each result contains
|
|
520
|
-
`{ browser, name, displayName, path, isDefault }`.
|
|
529
|
+
`{ browser, name, displayName, path, isDefault }`. If Safari's profile catalogue
|
|
530
|
+
cannot be read, a `Profiles` entry carries `error` alongside readable profiles.
|
|
531
|
+
Protected-file errors retain Full Disk Access instructions; cookie-source
|
|
532
|
+
listings preserve the same error even when a domain filter is supplied.
|
|
521
533
|
|
|
522
534
|
### readBrowserCookies(options)
|
|
523
535
|
|
|
@@ -580,7 +592,7 @@ const report = await migrateProfile({
|
|
|
580
592
|
'preferences',
|
|
581
593
|
'extensions',
|
|
582
594
|
],
|
|
583
|
-
domains: ['github.com'], // optional
|
|
595
|
+
domains: ['github.com'], // optional cookies/history/passwords filter
|
|
584
596
|
});
|
|
585
597
|
```
|
|
586
598
|
|
|
@@ -1032,7 +1044,7 @@ echo '{"jsonrpc":"2.0","id":1,"method":"version"}' | npx browser-commander serve
|
|
|
1032
1044
|
|
|
1033
1045
|
The other commands are `open`, `click`, `screenshot`, `pdf`, `trace start|stop|view`, `cookies import`, `profile migrate` and `doctor`. Use the `=` form for values that start with `--`, for example `--arg=--lang=de`.
|
|
1034
1046
|
|
|
1035
|
-
`serve --stdio` exposes the high-level methods (`session.launch`, `page.goto`, …). It also exposes generic handle methods (`handle.root`, `handle.call`, `handle.get`, `handle.describe`, `events.subscribe`, …), which reach
|
|
1047
|
+
`serve --stdio` exposes the high-level methods (`session.launch`, `page.goto`, …). It also exposes generic handle methods (`handle.root`, `handle.call`, `handle.get`, `handle.describe`, `events.subscribe`, …), which reach public Playwright, Puppeteer, and Selenium methods and constructors. The Rust and Python ports use this bridge for the engines they do not implement natively.
|
|
1036
1048
|
|
|
1037
1049
|
For raw Chrome DevTools Protocol access from JavaScript, `createCdpSession(page)` (or `commander.createCdpSession()`) returns the same `send`/`on`/`once`/`off`/`detach` surface for Playwright and Puppeteer pages.
|
|
1038
1050
|
|