webdriver 9.4.2 → 9.4.3
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/index.js +21 -6
- package/build/node.js +21 -6
- package/build/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -1205,6 +1205,21 @@ var getSessionError = (err, params = {}) => {
|
|
|
1205
1205
|
return err.message;
|
|
1206
1206
|
};
|
|
1207
1207
|
function initiateBidi(socketUrl, strictSSL = true) {
|
|
1208
|
+
const isUnitTesting = process.env.WDIO_UNIT_TESTS;
|
|
1209
|
+
if (isUnitTesting) {
|
|
1210
|
+
log3.info("Skip connecting to WebDriver Bidi interface due to unit tests");
|
|
1211
|
+
return {
|
|
1212
|
+
_bidiHandler: {
|
|
1213
|
+
value: {
|
|
1214
|
+
isConnected: true,
|
|
1215
|
+
waitForConnected: () => Promise.resolve(),
|
|
1216
|
+
socket: { on: () => {
|
|
1217
|
+
}, off: () => {
|
|
1218
|
+
} }
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1208
1223
|
socketUrl = socketUrl.replace("localhost", "127.0.0.1");
|
|
1209
1224
|
const bidiReqOpts = strictSSL ? {} : { rejectUnauthorized: false };
|
|
1210
1225
|
const handler = new BidiHandler(socketUrl, bidiReqOpts);
|
|
@@ -1263,7 +1278,7 @@ var WebDriver = class _WebDriver {
|
|
|
1263
1278
|
capabilities["wdio:driverPID"] = driverProcess.pid;
|
|
1264
1279
|
}
|
|
1265
1280
|
const bidiPrototype = {};
|
|
1266
|
-
if (isBidi(
|
|
1281
|
+
if (isBidi(capabilities)) {
|
|
1267
1282
|
log4.info("Register BiDi handler for session with id ".concat(sessionId));
|
|
1268
1283
|
Object.assign(bidiPrototype, initiateBidi(capabilities.webSocketUrl, options.strictSSL));
|
|
1269
1284
|
}
|
|
@@ -1278,7 +1293,7 @@ var WebDriver = class _WebDriver {
|
|
|
1278
1293
|
}
|
|
1279
1294
|
);
|
|
1280
1295
|
const client = monad(sessionId, customCommandWrapper);
|
|
1281
|
-
if (isBidi(
|
|
1296
|
+
if (isBidi(capabilities)) {
|
|
1282
1297
|
await client._bidiHandler.waitForConnected();
|
|
1283
1298
|
client._bidiHandler.socket.on("message", parseBidiMessage.bind(client));
|
|
1284
1299
|
}
|
|
@@ -1309,7 +1324,7 @@ var WebDriver = class _WebDriver {
|
|
|
1309
1324
|
const environmentPrototype = getEnvironmentVars(options);
|
|
1310
1325
|
const protocolCommands = getPrototype(options);
|
|
1311
1326
|
const bidiPrototype = {};
|
|
1312
|
-
if (isBidi(options.
|
|
1327
|
+
if (isBidi(options.capabilities || {})) {
|
|
1313
1328
|
const webSocketUrl = (_a = options.capabilities) == null ? void 0 : _a.webSocketUrl;
|
|
1314
1329
|
log4.info("Register BiDi handler for session with id ".concat(options.sessionId));
|
|
1315
1330
|
Object.assign(bidiPrototype, initiateBidi(webSocketUrl, options.strictSSL));
|
|
@@ -1317,7 +1332,7 @@ var WebDriver = class _WebDriver {
|
|
|
1317
1332
|
const prototype = { ...protocolCommands, ...environmentPrototype, ...userPrototype, ...bidiPrototype };
|
|
1318
1333
|
const monad = webdriverMonad(options, modifier, prototype);
|
|
1319
1334
|
const client = monad(options.sessionId, commandWrapper);
|
|
1320
|
-
if (isBidi(options.
|
|
1335
|
+
if (isBidi(options.capabilities || {})) {
|
|
1321
1336
|
(_b = client._bidiHandler) == null ? void 0 : _b.socket.on("message", parseBidiMessage.bind(client));
|
|
1322
1337
|
}
|
|
1323
1338
|
return client;
|
|
@@ -1362,7 +1377,7 @@ var WebDriver = class _WebDriver {
|
|
|
1362
1377
|
instance.capabilities = newSessionCapabilities;
|
|
1363
1378
|
instance.capabilities["wdio:driverPID"] = driverPid;
|
|
1364
1379
|
Object.assign(instance.requestedCapabilities, capabilities);
|
|
1365
|
-
if (isBidi(instance.
|
|
1380
|
+
if (isBidi(instance.capabilities || {})) {
|
|
1366
1381
|
const bidiReqOpts = instance.options.strictSSL ? {} : { rejectUnauthorized: false };
|
|
1367
1382
|
await ((_a = instance._bidiHandler) == null ? void 0 : _a.reconnect(newSessionCapabilities.webSocketUrl, bidiReqOpts));
|
|
1368
1383
|
}
|
|
@@ -1532,7 +1547,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1532
1547
|
// package.json
|
|
1533
1548
|
var package_default = {
|
|
1534
1549
|
name: "webdriver",
|
|
1535
|
-
version: "9.4.
|
|
1550
|
+
version: "9.4.2",
|
|
1536
1551
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1537
1552
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1538
1553
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
package/build/node.js
CHANGED
|
@@ -1188,6 +1188,21 @@ It seems like the service failed to start or is rejecting any connections.`;
|
|
|
1188
1188
|
return err.message;
|
|
1189
1189
|
};
|
|
1190
1190
|
function initiateBidi(socketUrl, strictSSL = true) {
|
|
1191
|
+
const isUnitTesting = process.env.WDIO_UNIT_TESTS;
|
|
1192
|
+
if (isUnitTesting) {
|
|
1193
|
+
log3.info("Skip connecting to WebDriver Bidi interface due to unit tests");
|
|
1194
|
+
return {
|
|
1195
|
+
_bidiHandler: {
|
|
1196
|
+
value: {
|
|
1197
|
+
isConnected: true,
|
|
1198
|
+
waitForConnected: () => Promise.resolve(),
|
|
1199
|
+
socket: { on: () => {
|
|
1200
|
+
}, off: () => {
|
|
1201
|
+
} }
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1191
1206
|
socketUrl = socketUrl.replace("localhost", "127.0.0.1");
|
|
1192
1207
|
const bidiReqOpts = strictSSL ? {} : { rejectUnauthorized: false };
|
|
1193
1208
|
const handler = new BidiHandler(socketUrl, bidiReqOpts);
|
|
@@ -1246,7 +1261,7 @@ var WebDriver = class _WebDriver {
|
|
|
1246
1261
|
capabilities["wdio:driverPID"] = driverProcess.pid;
|
|
1247
1262
|
}
|
|
1248
1263
|
const bidiPrototype = {};
|
|
1249
|
-
if (isBidi(
|
|
1264
|
+
if (isBidi(capabilities)) {
|
|
1250
1265
|
log4.info(`Register BiDi handler for session with id ${sessionId}`);
|
|
1251
1266
|
Object.assign(bidiPrototype, initiateBidi(capabilities.webSocketUrl, options.strictSSL));
|
|
1252
1267
|
}
|
|
@@ -1261,7 +1276,7 @@ var WebDriver = class _WebDriver {
|
|
|
1261
1276
|
}
|
|
1262
1277
|
);
|
|
1263
1278
|
const client = monad(sessionId, customCommandWrapper);
|
|
1264
|
-
if (isBidi(
|
|
1279
|
+
if (isBidi(capabilities)) {
|
|
1265
1280
|
await client._bidiHandler.waitForConnected();
|
|
1266
1281
|
client._bidiHandler.socket.on("message", parseBidiMessage.bind(client));
|
|
1267
1282
|
}
|
|
@@ -1291,7 +1306,7 @@ var WebDriver = class _WebDriver {
|
|
|
1291
1306
|
const environmentPrototype = getEnvironmentVars(options);
|
|
1292
1307
|
const protocolCommands = getPrototype(options);
|
|
1293
1308
|
const bidiPrototype = {};
|
|
1294
|
-
if (isBidi(options.
|
|
1309
|
+
if (isBidi(options.capabilities || {})) {
|
|
1295
1310
|
const webSocketUrl = options.capabilities?.webSocketUrl;
|
|
1296
1311
|
log4.info(`Register BiDi handler for session with id ${options.sessionId}`);
|
|
1297
1312
|
Object.assign(bidiPrototype, initiateBidi(webSocketUrl, options.strictSSL));
|
|
@@ -1299,7 +1314,7 @@ var WebDriver = class _WebDriver {
|
|
|
1299
1314
|
const prototype = { ...protocolCommands, ...environmentPrototype, ...userPrototype, ...bidiPrototype };
|
|
1300
1315
|
const monad = webdriverMonad(options, modifier, prototype);
|
|
1301
1316
|
const client = monad(options.sessionId, commandWrapper);
|
|
1302
|
-
if (isBidi(options.
|
|
1317
|
+
if (isBidi(options.capabilities || {})) {
|
|
1303
1318
|
client._bidiHandler?.socket.on("message", parseBidiMessage.bind(client));
|
|
1304
1319
|
}
|
|
1305
1320
|
return client;
|
|
@@ -1343,7 +1358,7 @@ var WebDriver = class _WebDriver {
|
|
|
1343
1358
|
instance.capabilities = newSessionCapabilities;
|
|
1344
1359
|
instance.capabilities["wdio:driverPID"] = driverPid;
|
|
1345
1360
|
Object.assign(instance.requestedCapabilities, capabilities);
|
|
1346
|
-
if (isBidi(instance.
|
|
1361
|
+
if (isBidi(instance.capabilities || {})) {
|
|
1347
1362
|
const bidiReqOpts = instance.options.strictSSL ? {} : { rejectUnauthorized: false };
|
|
1348
1363
|
await instance._bidiHandler?.reconnect(newSessionCapabilities.webSocketUrl, bidiReqOpts);
|
|
1349
1364
|
}
|
|
@@ -1470,7 +1485,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1470
1485
|
// package.json
|
|
1471
1486
|
var package_default = {
|
|
1472
1487
|
name: "webdriver",
|
|
1473
|
-
version: "9.4.
|
|
1488
|
+
version: "9.4.2",
|
|
1474
1489
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1475
1490
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1476
1491
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAU/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAK3D,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAYxF;;GAEG;AACH,wBAAsB,qBAAqB,CAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC;I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
|
|
4
4
|
"description": "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/node": "^20.1.0",
|
|
40
40
|
"@types/ws": "^8.5.3",
|
|
41
|
-
"@wdio/config": "9.4.
|
|
41
|
+
"@wdio/config": "9.4.3",
|
|
42
42
|
"@wdio/logger": "9.1.3",
|
|
43
43
|
"@wdio/protocols": "9.2.2",
|
|
44
|
-
"@wdio/types": "9.4.
|
|
45
|
-
"@wdio/utils": "9.4.
|
|
44
|
+
"@wdio/types": "9.4.3",
|
|
45
|
+
"@wdio/utils": "9.4.3",
|
|
46
46
|
"deepmerge-ts": "^7.0.3",
|
|
47
47
|
"undici": "^6.20.1",
|
|
48
48
|
"ws": "^8.8.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8ee63eaefd86cf06eea832bb8d4c1920e9cc4e55"
|
|
51
51
|
}
|