webdriver 9.5.3 → 9.5.4
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/command.d.ts.map +1 -1
- package/build/index.js +28 -22
- package/build/node.js +25 -22
- package/build/request/request.d.ts +4 -4
- package/build/request/request.d.ts.map +1 -1
- package/build/request/types.d.ts +22 -0
- package/build/request/types.d.ts.map +1 -1
- package/build/types.d.ts +5 -7
- package/build/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/request/index.d.ts +0 -26
- package/build/request/index.d.ts.map +0 -1
package/build/command.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAI7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAgB,aAAa,EAAE,MAAM,YAAY,CAAA;AAKzE,MAAM,CAAC,OAAO,WACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,eAAe,EAC5B,qBAAqB,UAAQ,UAIgB,UAAU,WAAW,OAAO,EAAE,KAAG,OAAO,CAAC,iBAAiB,GAAG,aAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAI7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAgB,aAAa,EAAE,MAAM,YAAY,CAAA;AAKzE,MAAM,CAAC,OAAO,WACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,eAAe,EAC5B,qBAAqB,UAAQ,UAIgB,UAAU,WAAW,OAAO,EAAE,KAAG,OAAO,CAAC,iBAAiB,GAAG,aAAa,GAAG,IAAI,CAAC,CAiLlI"}
|
package/build/index.js
CHANGED
|
@@ -103,8 +103,12 @@ function command_default(method, endpointUri, commandInfo, doubleEncodeVariables
|
|
|
103
103
|
}
|
|
104
104
|
body[commandParams[i].name] = arg;
|
|
105
105
|
}
|
|
106
|
-
const request = new environment.value.Request(method, endpoint, body, isHubCommand
|
|
107
|
-
|
|
106
|
+
const request = new environment.value.Request(method, endpoint, body, isHubCommand, {
|
|
107
|
+
onPerformance: (data) => this.emit("request.performance", data),
|
|
108
|
+
onRequest: (data) => this.emit("request.start", data),
|
|
109
|
+
onResponse: (data) => this.emit("request.end", data),
|
|
110
|
+
onRetry: (data) => this.emit("request.retry", data)
|
|
111
|
+
});
|
|
108
112
|
this.emit("command", { command, method, endpoint, body });
|
|
109
113
|
log.info("COMMAND", commandCallStructure(command, args));
|
|
110
114
|
return request.makeRequest(this.options, this.sessionId).then((result) => {
|
|
@@ -181,8 +185,8 @@ var DEFAULTS = {
|
|
|
181
185
|
*/
|
|
182
186
|
path: {
|
|
183
187
|
type: "string",
|
|
184
|
-
validate: (
|
|
185
|
-
if (!
|
|
188
|
+
validate: (path) => {
|
|
189
|
+
if (!path.startsWith("/")) {
|
|
186
190
|
throw new TypeError('The option "path" needs to start with a "/"');
|
|
187
191
|
}
|
|
188
192
|
return true;
|
|
@@ -1439,8 +1443,6 @@ _callbacks = new WeakMap();
|
|
|
1439
1443
|
_ws2 = new WeakMap();
|
|
1440
1444
|
|
|
1441
1445
|
// src/request/request.ts
|
|
1442
|
-
import path from "node:path";
|
|
1443
|
-
import { EventEmitter } from "node:events";
|
|
1444
1446
|
import logger5 from "@wdio/logger";
|
|
1445
1447
|
import { transformCommandLogResult as transformCommandLogResult2, sleep } from "@wdio/utils";
|
|
1446
1448
|
|
|
@@ -1556,7 +1558,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1556
1558
|
// package.json
|
|
1557
1559
|
var package_default = {
|
|
1558
1560
|
name: "webdriver",
|
|
1559
|
-
version: "9.5.
|
|
1561
|
+
version: "9.5.3",
|
|
1560
1562
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1561
1563
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1562
1564
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -1617,23 +1619,25 @@ var DEFAULT_HEADERS = {
|
|
|
1617
1619
|
"User-Agent": "webdriver/" + package_default.version
|
|
1618
1620
|
};
|
|
1619
1621
|
var log5 = logger5("webdriver");
|
|
1620
|
-
var WebDriverRequest = class
|
|
1621
|
-
constructor(method, endpoint, body, isHubCommand = false) {
|
|
1622
|
-
super();
|
|
1622
|
+
var WebDriverRequest = class {
|
|
1623
|
+
constructor(method, endpoint, body, isHubCommand = false, eventHandler = {}) {
|
|
1623
1624
|
__publicField(this, "body");
|
|
1624
1625
|
__publicField(this, "method");
|
|
1625
1626
|
__publicField(this, "endpoint");
|
|
1626
1627
|
__publicField(this, "isHubCommand");
|
|
1627
1628
|
__publicField(this, "requiresSessionId");
|
|
1629
|
+
__publicField(this, "eventHandler");
|
|
1628
1630
|
this.body = body;
|
|
1629
1631
|
this.method = method;
|
|
1630
1632
|
this.endpoint = endpoint;
|
|
1631
1633
|
this.isHubCommand = isHubCommand;
|
|
1632
1634
|
this.requiresSessionId = Boolean(this.endpoint.match(/:sessionId/));
|
|
1635
|
+
this.eventHandler = eventHandler;
|
|
1633
1636
|
}
|
|
1634
1637
|
async makeRequest(options, sessionId) {
|
|
1638
|
+
var _a, _b;
|
|
1635
1639
|
const { url, requestOptions } = await this.createOptions(options, sessionId);
|
|
1636
|
-
this.
|
|
1640
|
+
(_b = (_a = this.eventHandler).onRequest) == null ? void 0 : _b.call(_a, requestOptions);
|
|
1637
1641
|
return this._request(url, requestOptions, options.transformResponse, options.connectionRetryCount, 0);
|
|
1638
1642
|
}
|
|
1639
1643
|
async createOptions(options, sessionId, isBrowser = false) {
|
|
@@ -1659,7 +1663,7 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1659
1663
|
}
|
|
1660
1664
|
endpoint = endpoint.replace(":sessionId", sessionId);
|
|
1661
1665
|
}
|
|
1662
|
-
const url = new URL("".concat(options.protocol, "://").concat(options.hostname, ":").concat(options.port).concat(this.isHubCommand ? this.endpoint :
|
|
1666
|
+
const url = new URL("".concat(options.protocol, "://").concat(options.hostname, ":").concat(options.port).concat(this.isHubCommand ? this.endpoint : "".concat(options.path || "", "/").concat(endpoint).replace(/(\/){2,}/g, "/")));
|
|
1663
1667
|
if (searchParams) {
|
|
1664
1668
|
url.search = new URLSearchParams(searchParams).toString();
|
|
1665
1669
|
}
|
|
@@ -1698,6 +1702,7 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1698
1702
|
}
|
|
1699
1703
|
}
|
|
1700
1704
|
async _request(url, fullRequestOptions, transformResponse, totalRetryCount = 0, retryCount = 0) {
|
|
1705
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1701
1706
|
log5.info("[".concat(fullRequestOptions.method, "] ").concat(url.href));
|
|
1702
1707
|
if (fullRequestOptions.body && Object.keys(fullRequestOptions.body).length) {
|
|
1703
1708
|
log5.info("DATA", transformCommandLogResult2(fullRequestOptions.body));
|
|
@@ -1707,18 +1712,19 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1707
1712
|
let response = await this._libRequest(url, requestLibOptions).catch((err) => err);
|
|
1708
1713
|
const durationMillisecond = performance.now() - startTime;
|
|
1709
1714
|
const retry = async (error2) => {
|
|
1715
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
1710
1716
|
if (retryCount >= totalRetryCount || error2.message.includes("invalid session id")) {
|
|
1711
1717
|
log5.error(error2.message);
|
|
1712
|
-
this.
|
|
1713
|
-
this.
|
|
1718
|
+
(_b2 = (_a2 = this.eventHandler).onResponse) == null ? void 0 : _b2.call(_a2, { error: error2 });
|
|
1719
|
+
(_d2 = (_c2 = this.eventHandler).onPerformance) == null ? void 0 : _d2.call(_c2, { request: fullRequestOptions, durationMillisecond, success: false, error: error2, retryCount });
|
|
1714
1720
|
throw error2;
|
|
1715
1721
|
}
|
|
1716
1722
|
if (retryCount > 0) {
|
|
1717
1723
|
await sleep(Math.min(1e4, 250 * Math.pow(2, retryCount)));
|
|
1718
1724
|
}
|
|
1719
1725
|
++retryCount;
|
|
1720
|
-
this.
|
|
1721
|
-
this.
|
|
1726
|
+
(_f2 = (_e2 = this.eventHandler).onRetry) == null ? void 0 : _f2.call(_e2, { error: error2, retryCount });
|
|
1727
|
+
(_h2 = (_g2 = this.eventHandler).onPerformance) == null ? void 0 : _h2.call(_g2, { request: fullRequestOptions, durationMillisecond, success: false, error: error2, retryCount });
|
|
1722
1728
|
log5.warn(error2.message);
|
|
1723
1729
|
log5.info("Retrying ".concat(retryCount, "/").concat(totalRetryCount));
|
|
1724
1730
|
return this._request(url, fullRequestOptions, transformResponse, totalRetryCount, retryCount);
|
|
@@ -1728,29 +1734,29 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1728
1734
|
if (resError.code && RETRYABLE_ERROR_CODES.includes(resError.code) || resError.statusCode && RETRYABLE_STATUS_CODES.includes(resError.statusCode)) {
|
|
1729
1735
|
return retry(resError);
|
|
1730
1736
|
}
|
|
1731
|
-
this.
|
|
1737
|
+
(_b = (_a = this.eventHandler).onPerformance) == null ? void 0 : _b.call(_a, { request: fullRequestOptions, durationMillisecond, success: false, error: response, retryCount });
|
|
1732
1738
|
throw response;
|
|
1733
1739
|
}
|
|
1734
1740
|
if (typeof transformResponse === "function") {
|
|
1735
1741
|
response = transformResponse(response, fullRequestOptions);
|
|
1736
1742
|
}
|
|
1737
1743
|
if (isSuccessfulResponse(response.statusCode, response.body)) {
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
1744
|
+
(_d = (_c = this.eventHandler).onResponse) == null ? void 0 : _d.call(_c, { result: response.body });
|
|
1745
|
+
(_f = (_e = this.eventHandler).onPerformance) == null ? void 0 : _f.call(_e, { request: fullRequestOptions, durationMillisecond, success: true, retryCount });
|
|
1740
1746
|
return response.body;
|
|
1741
1747
|
}
|
|
1742
1748
|
const error = new WebDriverResponseError(response, url, fullRequestOptions);
|
|
1743
1749
|
if (this.isHubCommand) {
|
|
1744
1750
|
if (typeof response.body === "string" && response.body.startsWith("<!DOCTYPE html>")) {
|
|
1745
|
-
this.
|
|
1751
|
+
(_h = (_g = this.eventHandler).onPerformance) == null ? void 0 : _h.call(_g, { request: fullRequestOptions, durationMillisecond, success: false, error, retryCount });
|
|
1746
1752
|
return Promise.reject(new Error("Command can only be called to a Selenium Hub"));
|
|
1747
1753
|
}
|
|
1748
1754
|
return { value: response.body || null };
|
|
1749
1755
|
}
|
|
1750
1756
|
if (error.name === "stale element reference") {
|
|
1751
1757
|
log5.warn("Request encountered a stale element - terminating request");
|
|
1752
|
-
this.
|
|
1753
|
-
this.
|
|
1758
|
+
(_j = (_i = this.eventHandler).onResponse) == null ? void 0 : _j.call(_i, { error });
|
|
1759
|
+
(_l = (_k = this.eventHandler).onPerformance) == null ? void 0 : _l.call(_k, { request: fullRequestOptions, durationMillisecond, success: false, error, retryCount });
|
|
1754
1760
|
throw error;
|
|
1755
1761
|
}
|
|
1756
1762
|
if (ERRORS_TO_EXCLUDE_FROM_RETRY.includes(error.name)) {
|
package/build/node.js
CHANGED
|
@@ -96,8 +96,12 @@ Actual: ${actual}` + moreInfo
|
|
|
96
96
|
}
|
|
97
97
|
body[commandParams[i].name] = arg;
|
|
98
98
|
}
|
|
99
|
-
const request = new environment.value.Request(method, endpoint, body, isHubCommand
|
|
100
|
-
|
|
99
|
+
const request = new environment.value.Request(method, endpoint, body, isHubCommand, {
|
|
100
|
+
onPerformance: (data) => this.emit("request.performance", data),
|
|
101
|
+
onRequest: (data) => this.emit("request.start", data),
|
|
102
|
+
onResponse: (data) => this.emit("request.end", data),
|
|
103
|
+
onRetry: (data) => this.emit("request.retry", data)
|
|
104
|
+
});
|
|
101
105
|
this.emit("command", { command, method, endpoint, body });
|
|
102
106
|
log.info("COMMAND", commandCallStructure(command, args));
|
|
103
107
|
return request.makeRequest(this.options, this.sessionId).then((result) => {
|
|
@@ -173,8 +177,8 @@ var DEFAULTS = {
|
|
|
173
177
|
*/
|
|
174
178
|
path: {
|
|
175
179
|
type: "string",
|
|
176
|
-
validate: (
|
|
177
|
-
if (!
|
|
180
|
+
validate: (path) => {
|
|
181
|
+
if (!path.startsWith("/")) {
|
|
178
182
|
throw new TypeError('The option "path" needs to start with a "/"');
|
|
179
183
|
}
|
|
180
184
|
return true;
|
|
@@ -1384,8 +1388,6 @@ import dns from "node:dns";
|
|
|
1384
1388
|
import { fetch as fetch2, Agent, ProxyAgent } from "undici";
|
|
1385
1389
|
|
|
1386
1390
|
// src/request/request.ts
|
|
1387
|
-
import path from "node:path";
|
|
1388
|
-
import { EventEmitter } from "node:events";
|
|
1389
1391
|
import logger5 from "@wdio/logger";
|
|
1390
1392
|
import { transformCommandLogResult as transformCommandLogResult2, sleep } from "@wdio/utils";
|
|
1391
1393
|
|
|
@@ -1495,7 +1497,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1495
1497
|
// package.json
|
|
1496
1498
|
var package_default = {
|
|
1497
1499
|
name: "webdriver",
|
|
1498
|
-
version: "9.5.
|
|
1500
|
+
version: "9.5.3",
|
|
1499
1501
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1500
1502
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1501
1503
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -1556,23 +1558,24 @@ var DEFAULT_HEADERS = {
|
|
|
1556
1558
|
"User-Agent": "webdriver/" + package_default.version
|
|
1557
1559
|
};
|
|
1558
1560
|
var log5 = logger5("webdriver");
|
|
1559
|
-
var WebDriverRequest = class
|
|
1561
|
+
var WebDriverRequest = class {
|
|
1560
1562
|
body;
|
|
1561
1563
|
method;
|
|
1562
1564
|
endpoint;
|
|
1563
1565
|
isHubCommand;
|
|
1564
1566
|
requiresSessionId;
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
+
eventHandler;
|
|
1568
|
+
constructor(method, endpoint, body, isHubCommand = false, eventHandler = {}) {
|
|
1567
1569
|
this.body = body;
|
|
1568
1570
|
this.method = method;
|
|
1569
1571
|
this.endpoint = endpoint;
|
|
1570
1572
|
this.isHubCommand = isHubCommand;
|
|
1571
1573
|
this.requiresSessionId = Boolean(this.endpoint.match(/:sessionId/));
|
|
1574
|
+
this.eventHandler = eventHandler;
|
|
1572
1575
|
}
|
|
1573
1576
|
async makeRequest(options, sessionId) {
|
|
1574
1577
|
const { url, requestOptions } = await this.createOptions(options, sessionId);
|
|
1575
|
-
this.
|
|
1578
|
+
this.eventHandler.onRequest?.(requestOptions);
|
|
1576
1579
|
return this._request(url, requestOptions, options.transformResponse, options.connectionRetryCount, 0);
|
|
1577
1580
|
}
|
|
1578
1581
|
async createOptions(options, sessionId, isBrowser = false) {
|
|
@@ -1598,7 +1601,7 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1598
1601
|
}
|
|
1599
1602
|
endpoint = endpoint.replace(":sessionId", sessionId);
|
|
1600
1603
|
}
|
|
1601
|
-
const url = new URL(`${options.protocol}://${options.hostname}:${options.port}${this.isHubCommand ? this.endpoint :
|
|
1604
|
+
const url = new URL(`${options.protocol}://${options.hostname}:${options.port}${this.isHubCommand ? this.endpoint : `${options.path || ""}/${endpoint}`.replace(/(\/){2,}/g, "/")}`);
|
|
1602
1605
|
if (searchParams) {
|
|
1603
1606
|
url.search = new URLSearchParams(searchParams).toString();
|
|
1604
1607
|
}
|
|
@@ -1647,16 +1650,16 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1647
1650
|
const retry = async (error2) => {
|
|
1648
1651
|
if (retryCount >= totalRetryCount || error2.message.includes("invalid session id")) {
|
|
1649
1652
|
log5.error(error2.message);
|
|
1650
|
-
this.
|
|
1651
|
-
this.
|
|
1653
|
+
this.eventHandler.onResponse?.({ error: error2 });
|
|
1654
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: false, error: error2, retryCount });
|
|
1652
1655
|
throw error2;
|
|
1653
1656
|
}
|
|
1654
1657
|
if (retryCount > 0) {
|
|
1655
1658
|
await sleep(Math.min(1e4, 250 * Math.pow(2, retryCount)));
|
|
1656
1659
|
}
|
|
1657
1660
|
++retryCount;
|
|
1658
|
-
this.
|
|
1659
|
-
this.
|
|
1661
|
+
this.eventHandler.onRetry?.({ error: error2, retryCount });
|
|
1662
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: false, error: error2, retryCount });
|
|
1660
1663
|
log5.warn(error2.message);
|
|
1661
1664
|
log5.info(`Retrying ${retryCount}/${totalRetryCount}`);
|
|
1662
1665
|
return this._request(url, fullRequestOptions, transformResponse, totalRetryCount, retryCount);
|
|
@@ -1666,29 +1669,29 @@ var WebDriverRequest = class extends EventEmitter {
|
|
|
1666
1669
|
if (resError.code && RETRYABLE_ERROR_CODES.includes(resError.code) || resError.statusCode && RETRYABLE_STATUS_CODES.includes(resError.statusCode)) {
|
|
1667
1670
|
return retry(resError);
|
|
1668
1671
|
}
|
|
1669
|
-
this.
|
|
1672
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: false, error: response, retryCount });
|
|
1670
1673
|
throw response;
|
|
1671
1674
|
}
|
|
1672
1675
|
if (typeof transformResponse === "function") {
|
|
1673
1676
|
response = transformResponse(response, fullRequestOptions);
|
|
1674
1677
|
}
|
|
1675
1678
|
if (isSuccessfulResponse(response.statusCode, response.body)) {
|
|
1676
|
-
this.
|
|
1677
|
-
this.
|
|
1679
|
+
this.eventHandler.onResponse?.({ result: response.body });
|
|
1680
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: true, retryCount });
|
|
1678
1681
|
return response.body;
|
|
1679
1682
|
}
|
|
1680
1683
|
const error = new WebDriverResponseError(response, url, fullRequestOptions);
|
|
1681
1684
|
if (this.isHubCommand) {
|
|
1682
1685
|
if (typeof response.body === "string" && response.body.startsWith("<!DOCTYPE html>")) {
|
|
1683
|
-
this.
|
|
1686
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: false, error, retryCount });
|
|
1684
1687
|
return Promise.reject(new Error("Command can only be called to a Selenium Hub"));
|
|
1685
1688
|
}
|
|
1686
1689
|
return { value: response.body || null };
|
|
1687
1690
|
}
|
|
1688
1691
|
if (error.name === "stale element reference") {
|
|
1689
1692
|
log5.warn("Request encountered a stale element - terminating request");
|
|
1690
|
-
this.
|
|
1691
|
-
this.
|
|
1693
|
+
this.eventHandler.onResponse?.({ error });
|
|
1694
|
+
this.eventHandler.onPerformance?.({ request: fullRequestOptions, durationMillisecond, success: false, error, retryCount });
|
|
1692
1695
|
throw error;
|
|
1693
1696
|
}
|
|
1694
1697
|
if (ERRORS_TO_EXCLUDE_FROM_RETRY.includes(error.name)) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EventEmitter } from 'node:events';
|
|
2
1
|
import type { Options } from '@wdio/types';
|
|
3
|
-
import type { WebDriverResponse, RequestLibResponse, RequestOptions } from './types.js';
|
|
4
|
-
export declare abstract class WebDriverRequest
|
|
2
|
+
import type { WebDriverResponse, RequestLibResponse, RequestOptions, RequestEventHandler } from './types.js';
|
|
3
|
+
export declare abstract class WebDriverRequest {
|
|
5
4
|
protected abstract fetch(url: URL, opts: RequestInit): Promise<Response>;
|
|
6
5
|
body?: Record<string, unknown>;
|
|
7
6
|
method: string;
|
|
8
7
|
endpoint: string;
|
|
9
8
|
isHubCommand: boolean;
|
|
10
9
|
requiresSessionId: boolean;
|
|
11
|
-
|
|
10
|
+
eventHandler: RequestEventHandler;
|
|
11
|
+
constructor(method: string, endpoint: string, body?: Record<string, unknown>, isHubCommand?: boolean, eventHandler?: RequestEventHandler);
|
|
12
12
|
makeRequest(options: RequestOptions, sessionId?: string): Promise<WebDriverResponse<unknown>>;
|
|
13
13
|
createOptions(options: RequestOptions, sessionId?: string, isBrowser?: boolean): Promise<{
|
|
14
14
|
url: URL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request/request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAI1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAoB5G,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,mBAAmB,CAAA;gBAEpB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAE,OAAe,EAAE,YAAY,GAAE,mBAAwB;IAS9I,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;QAAC,GAAG,EAAE,GAAG,CAAC;QAAC,cAAc,EAAE,WAAW,CAAC;KAAC,CAAC;cA2DhI,WAAW,CAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;cA6B9E,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;CA0HhC"}
|
package/build/request/types.d.ts
CHANGED
|
@@ -16,4 +16,26 @@ export interface WebDriverResponse<T = unknown> {
|
|
|
16
16
|
}
|
|
17
17
|
export type RequestLibResponse = Options.RequestLibResponse;
|
|
18
18
|
export type RequestOptions = Omit<Options.WebDriver, 'capabilities'>;
|
|
19
|
+
export interface RequestEventHandler {
|
|
20
|
+
onRequest?: (ev: RequestStartEvent) => void;
|
|
21
|
+
onResponse?: (ev: RequestEndEvent) => void;
|
|
22
|
+
onRetry?: (ev: RequestRetryEvent) => void;
|
|
23
|
+
onPerformance?: (ev: RequestPerformanceEvent) => void;
|
|
24
|
+
}
|
|
25
|
+
export type RequestStartEvent = RequestInit;
|
|
26
|
+
export type RequestEndEvent = {
|
|
27
|
+
result?: unknown;
|
|
28
|
+
error?: Error;
|
|
29
|
+
};
|
|
30
|
+
export type RequestRetryEvent = {
|
|
31
|
+
error: Error;
|
|
32
|
+
retryCount: number;
|
|
33
|
+
};
|
|
34
|
+
export type RequestPerformanceEvent = {
|
|
35
|
+
request: RequestInit;
|
|
36
|
+
durationMillisecond: number;
|
|
37
|
+
success: boolean;
|
|
38
|
+
error?: Error;
|
|
39
|
+
retryCount: number;
|
|
40
|
+
};
|
|
19
41
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/request/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC1C,KAAK,EAAE,CAAC,CAAA;IACR;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;AAC3D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/request/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC1C,KAAK,EAAE,CAAC,CAAA;IACR;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;AAC3D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAChC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC3C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,eAAe,KAAK,IAAI,CAAA;IAC1C,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,uBAAuB,KAAK,IAAI,CAAA;CACxD;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAA;AAC3C,MAAM,MAAM,eAAe,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AACjE,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AACpE,MAAM,MAAM,uBAAuB,GAAG;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
package/build/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { BidiHandler } from './bidi/handler.js';
|
|
|
5
5
|
import type { EventData } from './bidi/localTypes.js';
|
|
6
6
|
import type { CommandData } from './bidi/remoteTypes.js';
|
|
7
7
|
import type { CommandResponse } from './bidi/localTypes.js';
|
|
8
|
+
import type { RequestStartEvent, RequestEndEvent, RequestPerformanceEvent, RequestRetryEvent } from './request/types.js';
|
|
8
9
|
export interface JSONWPCommandError extends Error {
|
|
9
10
|
code?: string;
|
|
10
11
|
statusCode?: string;
|
|
@@ -49,13 +50,10 @@ type WebDriverClassicEvents = {
|
|
|
49
50
|
};
|
|
50
51
|
bidiCommand: Omit<CommandData, 'id'>;
|
|
51
52
|
bidiResult: CommandResponse;
|
|
52
|
-
'request.performance':
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
retryCount: number;
|
|
57
|
-
success: boolean;
|
|
58
|
-
};
|
|
53
|
+
'request.performance': RequestPerformanceEvent;
|
|
54
|
+
'request.retry': RequestRetryEvent;
|
|
55
|
+
'request.start': RequestStartEvent;
|
|
56
|
+
'request.end': RequestEndEvent;
|
|
59
57
|
};
|
|
60
58
|
export type BidiEventMap = {
|
|
61
59
|
[Event in keyof Omit<WebDriverBidiCommands, 'sendCommand' | 'sendAsyncCommand'>]: BidiInterface[WebDriverBidiCommands[Event]['socket']['command']];
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,WAAW,kBAAmB,SAAQ,KAAK;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,OAAO,CAAA;IACxB,a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,SAAQ,YAAY,EAAE,YAAY;IAE1D,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,EAAE,WAAW,CAAC,YAAY,CAAA;IAEtC,qBAAqB,EAAE,YAAY,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAA;IAE7E,OAAO,EAAE,OAAO,CAAC,SAAS,CAAA;CAC7B;AAED,MAAM,WAAW,MAAO,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB;CAAG;AAE5H,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;IACpF,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,CAAC,EAAE,WAAW,CAAC,YAAY,CAAA;IAEvC,qBAAqB,CAAC,EAAE,YAAY,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAA;CACjF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.4",
|
|
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": "b4e5733841d26e9b3e29cac5630f9bb67e33e00e"
|
|
51
51
|
}
|
package/build/request/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'node:events';
|
|
2
|
-
import { URL } from 'node:url';
|
|
3
|
-
import type { Options } from '@wdio/types';
|
|
4
|
-
import type { WebDriverResponse } from './types.js';
|
|
5
|
-
type RequestLibResponse = Options.RequestLibResponse;
|
|
6
|
-
type RequestOptions = Omit<Options.WebDriver, 'capabilities'>;
|
|
7
|
-
export declare const COMMANDS_WITHOUT_RETRY: string[];
|
|
8
|
-
export default abstract class WebDriverRequest extends EventEmitter {
|
|
9
|
-
#private;
|
|
10
|
-
body?: Record<string, unknown>;
|
|
11
|
-
method: string;
|
|
12
|
-
endpoint: string;
|
|
13
|
-
isHubCommand: boolean;
|
|
14
|
-
requiresSessionId: boolean;
|
|
15
|
-
constructor(method: string, endpoint: string, body?: Record<string, unknown>, isHubCommand?: boolean);
|
|
16
|
-
makeRequest(options: RequestOptions, sessionId?: string): Promise<WebDriverResponse<unknown>>;
|
|
17
|
-
protected _createOptions(options: RequestOptions, sessionId?: string, isBrowser?: boolean): Promise<{
|
|
18
|
-
url: URL;
|
|
19
|
-
requestOptions: RequestInit;
|
|
20
|
-
}>;
|
|
21
|
-
protected _libRequest(_url: URL, _options: RequestInit): Promise<RequestLibResponse>;
|
|
22
|
-
protected _libPerformanceNow(): number;
|
|
23
|
-
private _request;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAI9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAI1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAMnD,KAAK,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;AACpD,KAAK,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;AAO7D,eAAO,MAAM,sBAAsB,UAElC,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