webdriver 9.5.4 → 9.6.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/build/bidi/core.d.ts +1 -0
- package/build/bidi/core.d.ts.map +1 -1
- package/build/index.js +19 -2
- package/build/node.js +19 -2
- package/package.json +2 -2
package/build/bidi/core.d.ts
CHANGED
|
@@ -34,4 +34,5 @@ export declare class BidiCore {
|
|
|
34
34
|
send(params: Omit<CommandData, 'id'>): Promise<CommandResponse>;
|
|
35
35
|
sendAsync(params: Omit<CommandData, 'id'>): number;
|
|
36
36
|
}
|
|
37
|
+
export declare function parseBidiCommand(params: Omit<CommandData, 'id'>): string[];
|
|
37
38
|
//# sourceMappingURL=core.d.ts.map
|
package/build/bidi/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/bidi/core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAI3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,iBAAiB,CAAA;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/bidi/core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAI3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,iBAAiB,CAAA;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAQzC,qBAAa,QAAQ;;IAOjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B;;OAEG;IACH,OAAO,CAAC,YAAY,CAAQ;gBAEf,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa;IAOvD;;;;OAIG;IACI,YAAY,CAAE,MAAM,EAAE,MAAM;IAItB,OAAO;IAyBb,KAAK;IAYL,SAAS,CAAE,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa;IAS5D;;;OAGG;IACH,gBAAgB;IAIhB,IAAI,MAAM,cAET;IAED,IAAI,WAAW,YAEd;IAED;;;OAGG;IACH,IAAI,gBAAgB,WAIG,OAAO,UAF7B;IAyBY,IAAI,CAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IA+BtE,SAAS,CAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAWpD;AAED,wBAAgB,gBAAgB,CAAE,MAAM,EAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAwCjE"}
|
package/build/index.js
CHANGED
|
@@ -317,6 +317,8 @@ import { CAPABILITY_KEYS } from "@wdio/protocols";
|
|
|
317
317
|
|
|
318
318
|
// src/bidi/core.ts
|
|
319
319
|
import logger2 from "@wdio/logger";
|
|
320
|
+
var SCRIPT_PREFIX = "/* __wdio script__ */";
|
|
321
|
+
var SCRIPT_SUFFIX = "/* __wdio script end__ */";
|
|
320
322
|
var log2 = logger2("webdriver");
|
|
321
323
|
var RESPONSE_TIMEOUT = 1e3 * 60;
|
|
322
324
|
var _id, _ws, _waitForConnected, _webSocketUrl, _pendingCommands, _BidiCore_instances, handleResponse_fn;
|
|
@@ -473,9 +475,24 @@ function parseBidiCommand(params) {
|
|
|
473
475
|
return [commandName, logString];
|
|
474
476
|
} else if (commandName === "script.callFunction") {
|
|
475
477
|
const param = params.params;
|
|
478
|
+
const fn = param.functionDeclaration;
|
|
479
|
+
let fnName = "";
|
|
480
|
+
if (fn.includes(SCRIPT_PREFIX)) {
|
|
481
|
+
const internalFn = fn.slice(
|
|
482
|
+
fn.indexOf(SCRIPT_PREFIX) + SCRIPT_PREFIX.length,
|
|
483
|
+
fn.indexOf(SCRIPT_SUFFIX)
|
|
484
|
+
);
|
|
485
|
+
const functionPrefix = "function ";
|
|
486
|
+
if (internalFn.startsWith(functionPrefix)) {
|
|
487
|
+
fnName = internalFn.slice(
|
|
488
|
+
internalFn.indexOf(functionPrefix) + functionPrefix.length,
|
|
489
|
+
internalFn.indexOf("(")
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
476
493
|
const logString = JSON.stringify({
|
|
477
494
|
...param,
|
|
478
|
-
functionDeclaration: "<Function[".concat(new TextEncoder().encode(param.functionDeclaration).length, " bytes]>")
|
|
495
|
+
functionDeclaration: "<Function[".concat(new TextEncoder().encode(param.functionDeclaration).length, " bytes] ").concat(fnName || "anonymous", ">")
|
|
479
496
|
});
|
|
480
497
|
return [commandName, logString];
|
|
481
498
|
}
|
|
@@ -1558,7 +1575,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1558
1575
|
// package.json
|
|
1559
1576
|
var package_default = {
|
|
1560
1577
|
name: "webdriver",
|
|
1561
|
-
version: "9.5.
|
|
1578
|
+
version: "9.5.4",
|
|
1562
1579
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1563
1580
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1564
1581
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
package/build/node.js
CHANGED
|
@@ -309,6 +309,8 @@ import { CAPABILITY_KEYS } from "@wdio/protocols";
|
|
|
309
309
|
|
|
310
310
|
// src/bidi/core.ts
|
|
311
311
|
import logger2 from "@wdio/logger";
|
|
312
|
+
var SCRIPT_PREFIX = "/* __wdio script__ */";
|
|
313
|
+
var SCRIPT_SUFFIX = "/* __wdio script end__ */";
|
|
312
314
|
var log2 = logger2("webdriver");
|
|
313
315
|
var RESPONSE_TIMEOUT = 1e3 * 60;
|
|
314
316
|
var BidiCore = class {
|
|
@@ -458,9 +460,24 @@ function parseBidiCommand(params) {
|
|
|
458
460
|
return [commandName, logString];
|
|
459
461
|
} else if (commandName === "script.callFunction") {
|
|
460
462
|
const param = params.params;
|
|
463
|
+
const fn = param.functionDeclaration;
|
|
464
|
+
let fnName = "";
|
|
465
|
+
if (fn.includes(SCRIPT_PREFIX)) {
|
|
466
|
+
const internalFn = fn.slice(
|
|
467
|
+
fn.indexOf(SCRIPT_PREFIX) + SCRIPT_PREFIX.length,
|
|
468
|
+
fn.indexOf(SCRIPT_SUFFIX)
|
|
469
|
+
);
|
|
470
|
+
const functionPrefix = "function ";
|
|
471
|
+
if (internalFn.startsWith(functionPrefix)) {
|
|
472
|
+
fnName = internalFn.slice(
|
|
473
|
+
internalFn.indexOf(functionPrefix) + functionPrefix.length,
|
|
474
|
+
internalFn.indexOf("(")
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
461
478
|
const logString = JSON.stringify({
|
|
462
479
|
...param,
|
|
463
|
-
functionDeclaration: `<Function[${new TextEncoder().encode(param.functionDeclaration).length} bytes]>`
|
|
480
|
+
functionDeclaration: `<Function[${new TextEncoder().encode(param.functionDeclaration).length} bytes] ${fnName || "anonymous"}>`
|
|
464
481
|
});
|
|
465
482
|
return [commandName, logString];
|
|
466
483
|
}
|
|
@@ -1497,7 +1514,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1497
1514
|
// package.json
|
|
1498
1515
|
var package_default = {
|
|
1499
1516
|
name: "webdriver",
|
|
1500
|
-
version: "9.5.
|
|
1517
|
+
version: "9.5.4",
|
|
1501
1518
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1502
1519
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1503
1520
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
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",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"undici": "^6.20.1",
|
|
48
48
|
"ws": "^8.8.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "bea75d896564c2285012cd7c77948dce6ab45804"
|
|
51
51
|
}
|