webdriver 9.12.6 → 9.14.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.map +1 -1
- package/build/bidi/handler.d.ts +48 -6
- package/build/bidi/handler.d.ts.map +1 -1
- package/build/bidi/localTypes.d.ts +93 -15
- package/build/bidi/localTypes.d.ts.map +1 -1
- package/build/bidi/remoteTypes.d.ts +167 -17
- package/build/bidi/remoteTypes.d.ts.map +1 -1
- package/build/index.js +88 -10
- package/build/node/bidi.d.ts.map +1 -1
- package/build/node.js +91 -11
- package/build/request/request.d.ts.map +1 -1
- package/package.json +6 -6
package/build/node.js
CHANGED
|
@@ -481,9 +481,10 @@ var BidiCore = class {
|
|
|
481
481
|
});
|
|
482
482
|
});
|
|
483
483
|
if (payload.type === "error" || "error" in payload) {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
const error = payload;
|
|
485
|
+
failError.message += ` with error: ${payload.error} - ${error.message}`;
|
|
486
|
+
if (error.stacktrace && typeof error.stacktrace === "string") {
|
|
487
|
+
const driverStack = error.stacktrace.split("\n").filter(Boolean).map((line) => ` at ${line}`).join("\n");
|
|
487
488
|
failError.stack += `
|
|
488
489
|
|
|
489
490
|
Driver Stack:
|
|
@@ -581,7 +582,7 @@ var BidiHandler = class extends BidiCore {
|
|
|
581
582
|
* WebDriver Bidi command to send command method "session.subscribe" with parameters.
|
|
582
583
|
* @url https://w3c.github.io/webdriver-bidi/#command-session-subscribe
|
|
583
584
|
* @param params `remote.SessionSubscriptionRequest` {@link https://w3c.github.io/webdriver-bidi/#command-session-subscribe | command parameter}
|
|
584
|
-
* @returns `Promise<local.
|
|
585
|
+
* @returns `Promise<local.SessionSubscribeResult>`
|
|
585
586
|
**/
|
|
586
587
|
async sessionSubscribe(params) {
|
|
587
588
|
const result = await this.send({
|
|
@@ -593,7 +594,7 @@ var BidiHandler = class extends BidiCore {
|
|
|
593
594
|
/**
|
|
594
595
|
* WebDriver Bidi command to send command method "session.unsubscribe" with parameters.
|
|
595
596
|
* @url https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe
|
|
596
|
-
* @param params `remote.
|
|
597
|
+
* @param params `remote.SessionUnsubscribeParameters` {@link https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe | command parameter}
|
|
597
598
|
* @returns `Promise<local.EmptyResult>`
|
|
598
599
|
**/
|
|
599
600
|
async sessionUnsubscribe(params) {
|
|
@@ -619,7 +620,7 @@ var BidiHandler = class extends BidiCore {
|
|
|
619
620
|
/**
|
|
620
621
|
* WebDriver Bidi command to send command method "browser.createUserContext" with parameters.
|
|
621
622
|
* @url https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext
|
|
622
|
-
* @param params `remote.
|
|
623
|
+
* @param params `remote.BrowserCreateUserContextParameters` {@link https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext | command parameter}
|
|
623
624
|
* @returns `Promise<local.BrowserCreateUserContextResult>`
|
|
624
625
|
**/
|
|
625
626
|
async browserCreateUserContext(params) {
|
|
@@ -629,6 +630,19 @@ var BidiHandler = class extends BidiCore {
|
|
|
629
630
|
});
|
|
630
631
|
return result.result;
|
|
631
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* WebDriver Bidi command to send command method "browser.getClientWindows" with parameters.
|
|
635
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-browser-getClientWindows
|
|
636
|
+
* @param params `remote.EmptyParams` {@link https://w3c.github.io/webdriver-bidi/#command-browser-getClientWindows | command parameter}
|
|
637
|
+
* @returns `Promise<local.BrowserGetClientWindowsResult>`
|
|
638
|
+
**/
|
|
639
|
+
async browserGetClientWindows(params) {
|
|
640
|
+
const result = await this.send({
|
|
641
|
+
method: "browser.getClientWindows",
|
|
642
|
+
params
|
|
643
|
+
});
|
|
644
|
+
return result.result;
|
|
645
|
+
}
|
|
632
646
|
/**
|
|
633
647
|
* WebDriver Bidi command to send command method "browser.getUserContexts" with parameters.
|
|
634
648
|
* @url https://w3c.github.io/webdriver-bidi/#command-browser-getUserContexts
|
|
@@ -655,6 +669,19 @@ var BidiHandler = class extends BidiCore {
|
|
|
655
669
|
});
|
|
656
670
|
return result.result;
|
|
657
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
* WebDriver Bidi command to send command method "browser.setClientWindowState" with parameters.
|
|
674
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-browser-setClientWindowState
|
|
675
|
+
* @param params `remote.BrowserSetClientWindowStateParameters` {@link https://w3c.github.io/webdriver-bidi/#command-browser-setClientWindowState | command parameter}
|
|
676
|
+
* @returns `Promise<local.EmptyResult>`
|
|
677
|
+
**/
|
|
678
|
+
async browserSetClientWindowState(params) {
|
|
679
|
+
const result = await this.send({
|
|
680
|
+
method: "browser.setClientWindowState",
|
|
681
|
+
params
|
|
682
|
+
});
|
|
683
|
+
return result.result;
|
|
684
|
+
}
|
|
658
685
|
/**
|
|
659
686
|
* WebDriver Bidi command to send command method "browsingContext.activate" with parameters.
|
|
660
687
|
* @url https://w3c.github.io/webdriver-bidi/#command-browsingContext-activate
|
|
@@ -811,6 +838,19 @@ var BidiHandler = class extends BidiCore {
|
|
|
811
838
|
});
|
|
812
839
|
return result.result;
|
|
813
840
|
}
|
|
841
|
+
/**
|
|
842
|
+
* WebDriver Bidi command to send command method "emulation.setGeolocationOverride" with parameters.
|
|
843
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-emulation-setGeolocationOverride
|
|
844
|
+
* @param params `remote.EmulationSetGeolocationOverrideParameters` {@link https://w3c.github.io/webdriver-bidi/#command-emulation-setGeolocationOverride | command parameter}
|
|
845
|
+
* @returns `Promise<local.EmptyResult>`
|
|
846
|
+
**/
|
|
847
|
+
async emulationSetGeolocationOverride(params) {
|
|
848
|
+
const result = await this.send({
|
|
849
|
+
method: "emulation.setGeolocationOverride",
|
|
850
|
+
params
|
|
851
|
+
});
|
|
852
|
+
return result.result;
|
|
853
|
+
}
|
|
814
854
|
/**
|
|
815
855
|
* WebDriver Bidi command to send command method "network.addIntercept" with parameters.
|
|
816
856
|
* @url https://w3c.github.io/webdriver-bidi/#command-network-addIntercept
|
|
@@ -902,6 +942,19 @@ var BidiHandler = class extends BidiCore {
|
|
|
902
942
|
});
|
|
903
943
|
return result.result;
|
|
904
944
|
}
|
|
945
|
+
/**
|
|
946
|
+
* WebDriver Bidi command to send command method "network.setCacheBehavior" with parameters.
|
|
947
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-network-setCacheBehavior
|
|
948
|
+
* @param params `remote.NetworkSetCacheBehaviorParameters` {@link https://w3c.github.io/webdriver-bidi/#command-network-setCacheBehavior | command parameter}
|
|
949
|
+
* @returns `Promise<local.EmptyResult>`
|
|
950
|
+
**/
|
|
951
|
+
async networkSetCacheBehavior(params) {
|
|
952
|
+
const result = await this.send({
|
|
953
|
+
method: "network.setCacheBehavior",
|
|
954
|
+
params
|
|
955
|
+
});
|
|
956
|
+
return result.result;
|
|
957
|
+
}
|
|
905
958
|
/**
|
|
906
959
|
* WebDriver Bidi command to send command method "script.addPreloadScript" with parameters.
|
|
907
960
|
* @url https://w3c.github.io/webdriver-bidi/#command-script-addPreloadScript
|
|
@@ -1058,6 +1111,32 @@ var BidiHandler = class extends BidiCore {
|
|
|
1058
1111
|
});
|
|
1059
1112
|
return result.result;
|
|
1060
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
* WebDriver Bidi command to send command method "webExtension.install" with parameters.
|
|
1116
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-webExtension-install
|
|
1117
|
+
* @param params `remote.WebExtensionInstallParameters` {@link https://w3c.github.io/webdriver-bidi/#command-webExtension-install | command parameter}
|
|
1118
|
+
* @returns `Promise<local.WebExtensionInstallResult>`
|
|
1119
|
+
**/
|
|
1120
|
+
async webExtensionInstall(params) {
|
|
1121
|
+
const result = await this.send({
|
|
1122
|
+
method: "webExtension.install",
|
|
1123
|
+
params
|
|
1124
|
+
});
|
|
1125
|
+
return result.result;
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* WebDriver Bidi command to send command method "webExtension.uninstall" with parameters.
|
|
1129
|
+
* @url https://w3c.github.io/webdriver-bidi/#command-webExtension-uninstall
|
|
1130
|
+
* @param params `remote.WebExtensionUninstallParameters` {@link https://w3c.github.io/webdriver-bidi/#command-webExtension-uninstall | command parameter}
|
|
1131
|
+
* @returns `Promise<local.EmptyResult>`
|
|
1132
|
+
**/
|
|
1133
|
+
async webExtensionUninstall(params) {
|
|
1134
|
+
const result = await this.send({
|
|
1135
|
+
method: "webExtension.uninstall",
|
|
1136
|
+
params
|
|
1137
|
+
});
|
|
1138
|
+
return result.result;
|
|
1139
|
+
}
|
|
1061
1140
|
};
|
|
1062
1141
|
|
|
1063
1142
|
// src/utils.ts
|
|
@@ -1575,7 +1654,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1575
1654
|
// package.json
|
|
1576
1655
|
var package_default = {
|
|
1577
1656
|
name: "webdriver",
|
|
1578
|
-
version: "9.
|
|
1657
|
+
version: "9.13.0",
|
|
1579
1658
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1580
1659
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1581
1660
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -1742,10 +1821,9 @@ var WebDriverRequest = class {
|
|
|
1742
1821
|
redirect: opts.redirect,
|
|
1743
1822
|
...dispatcher ? { dispatcher } : {}
|
|
1744
1823
|
});
|
|
1745
|
-
const resp = response.clone();
|
|
1746
1824
|
return {
|
|
1747
|
-
statusCode:
|
|
1748
|
-
body: await
|
|
1825
|
+
statusCode: response.status,
|
|
1826
|
+
body: await response.json() ?? {}
|
|
1749
1827
|
};
|
|
1750
1828
|
} catch (err) {
|
|
1751
1829
|
if (!(err instanceof Error)) {
|
|
@@ -1900,8 +1978,9 @@ async function connectWebsocket(candidateUrls, options) {
|
|
|
1900
1978
|
});
|
|
1901
1979
|
return { promise, index };
|
|
1902
1980
|
});
|
|
1981
|
+
let timeoutId;
|
|
1903
1982
|
const connectionTimeoutPromise = new Promise((resolve) => {
|
|
1904
|
-
setTimeout(() => {
|
|
1983
|
+
timeoutId = setTimeout(() => {
|
|
1905
1984
|
log6.error(`Could not connect to Bidi protocol of any candidate url in time: "${candidateUrls.join('", "')}"`);
|
|
1906
1985
|
return resolve(void 0);
|
|
1907
1986
|
}, CONNECTION_TIMEOUT);
|
|
@@ -1910,6 +1989,7 @@ async function connectWebsocket(candidateUrls, options) {
|
|
|
1910
1989
|
firstResolved(wsConnectPromises),
|
|
1911
1990
|
connectionTimeoutPromise
|
|
1912
1991
|
]);
|
|
1992
|
+
clearTimeout(timeoutId);
|
|
1913
1993
|
const socketsToCleanup = wsInfo ? websockets.filter((_, index) => wsInfo.index !== index) : websockets;
|
|
1914
1994
|
for (const socket of socketsToCleanup) {
|
|
1915
1995
|
socket.removeAllListeners();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request/request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAM5G,OAAO,eAAe,CAAA;AAgBtB,8BAAsB,gBAAgB;IAClC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAExE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,YAAY,EAAE,mBA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C,EAAE,WAAW,CAAA;gBAErB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,WAAW,CAAC,EAAE,WAAW,EACzB,YAAY,GAAE,OAAe,EAC7B,YAAY,GAAE,mBAAwB;IAWpC,WAAW,CAAE,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM;IAMxD,aAAa,CAAE,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,cAAc,EAAE,WAAW,CAAC;KAAE,CAAC;cA+DlI,WAAW,CAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;cA+B9E,QAAQ,CACpB,GAAG,EAAE,GAAG,EACR,kBAAkB,EAAE,WAAW,EAC/B,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,KAAK,kBAAkB,EACrG,eAAe,SAAI,EACnB,UAAU,SAAI,GACf,OAAO,CAAC,iBAAiB,CAAC;CA+HhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.14.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",
|
|
@@ -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.
|
|
41
|
+
"@wdio/config": "9.14.0",
|
|
42
42
|
"@wdio/logger": "9.4.4",
|
|
43
|
-
"@wdio/protocols": "9.
|
|
44
|
-
"@wdio/types": "9.
|
|
45
|
-
"@wdio/utils": "9.
|
|
43
|
+
"@wdio/protocols": "9.14.0",
|
|
44
|
+
"@wdio/types": "9.14.0",
|
|
45
|
+
"@wdio/utils": "9.14.0",
|
|
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": "f8e62f63eb087a06556e8c85e042403da0e4485e"
|
|
51
51
|
}
|