webdriverio 9.27.0 → 9.27.1
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/commands/browser/getCookies.d.ts +2 -1
- package/build/commands/browser/getCookies.d.ts.map +1 -1
- package/build/index.js +161 -29
- package/build/node.js +153 -22
- package/build/session/shadowRoot.d.ts.map +1 -1
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/interception/index.d.ts +4 -4
- package/build/utils/interception/index.d.ts.map +1 -1
- package/build/utils/interception/types.d.ts +3 -0
- package/build/utils/interception/types.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -33,8 +33,9 @@ import type { remote } from 'webdriver';
|
|
|
33
33
|
*
|
|
34
34
|
* @alias browser.getCookies
|
|
35
35
|
* @param {remote.StorageCookieFilter} filter an object that allows to filter for cookies with specific attributes
|
|
36
|
+
* @param {string|null} sourceOrigin an optional source origin to fetch cookies for, if not provided it will default to the current page's origin, if explicitly set to null it will fetch cookies without a partition (only supported in BiDi)
|
|
36
37
|
* @return {Cookie[]} requested cookies
|
|
37
38
|
*
|
|
38
39
|
*/
|
|
39
|
-
export declare function getCookies(this: WebdriverIO.Browser, filter?: string | string[] | remote.StorageCookieFilter): Promise<Cookie[]>;
|
|
40
|
+
export declare function getCookies(this: WebdriverIO.Browser, filter?: string | string[] | remote.StorageCookieFilter, sourceOrigin?: string | null): Promise<Cookie[]>;
|
|
40
41
|
//# sourceMappingURL=getCookies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC
|
|
1
|
+
{"version":3,"file":"getCookies.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/getCookies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,mBAAmB,EACvD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAC7B,OAAO,CAAC,MAAM,EAAE,CAAC,CAuDnB"}
|
package/build/index.js
CHANGED
|
@@ -3561,7 +3561,7 @@ async function executeAsync(script, ...args) {
|
|
|
3561
3561
|
// src/commands/browser/getCookies.ts
|
|
3562
3562
|
import logger6 from "@wdio/logger";
|
|
3563
3563
|
var log6 = logger6("webdriverio");
|
|
3564
|
-
async function getCookies(filter) {
|
|
3564
|
+
async function getCookies(filter, sourceOrigin) {
|
|
3565
3565
|
const usesMultipleFilter = Array.isArray(filter) && filter.length > 1;
|
|
3566
3566
|
if (!this.isBidi || usesMultipleFilter) {
|
|
3567
3567
|
return getCookiesClassic.call(this, filter);
|
|
@@ -3576,10 +3576,10 @@ async function getCookies(filter) {
|
|
|
3576
3576
|
} catch {
|
|
3577
3577
|
return getCookiesClassic.call(this, filter);
|
|
3578
3578
|
}
|
|
3579
|
-
const params = {
|
|
3579
|
+
const params = sourceOrigin === null ? {} : {
|
|
3580
3580
|
partition: {
|
|
3581
3581
|
type: "storageKey",
|
|
3582
|
-
sourceOrigin: url2.origin
|
|
3582
|
+
sourceOrigin: sourceOrigin || url2.origin
|
|
3583
3583
|
}
|
|
3584
3584
|
};
|
|
3585
3585
|
if (typeof cookieFilter !== "undefined") {
|
|
@@ -3940,8 +3940,9 @@ function getPatternParam(pattern, key) {
|
|
|
3940
3940
|
|
|
3941
3941
|
// src/utils/interception/index.ts
|
|
3942
3942
|
var log8 = logger8("WebDriverInterception");
|
|
3943
|
+
var DEFAULT_SPY_COLLECTED_BODY_SIZE = 10 * 1024 * 1024;
|
|
3943
3944
|
var hasSubscribedToEvents = false;
|
|
3944
|
-
var _pattern, _mockId, _filterOptions, _browser4, _eventHandler, _restored, _requestOverwrites, _respondOverwrites, _calls,
|
|
3945
|
+
var _pattern, _mockId, _filterOptions, _browser4, _eventHandler, _restored, _requestOverwrites, _respondOverwrites, _calls, _overwrittenResponseBodies, _WebDriverInterception_instances, emit_fn, addEventHandler_fn, handleBeforeRequestSent_fn, handleResponseStarted_fn, handleResponseCompleted_fn, handleNetworkProvideResponseError_fn, isRequestMatching_fn, matchesFilterOptions_fn, _setOverwrite, ensureNotRestored_fn;
|
|
3945
3946
|
var _WebDriverInterception = class _WebDriverInterception {
|
|
3946
3947
|
constructor(pattern, mockId, filterOptions, browser) {
|
|
3947
3948
|
__privateAdd(this, _WebDriverInterception_instances);
|
|
@@ -3954,7 +3955,7 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
3954
3955
|
__privateAdd(this, _requestOverwrites, []);
|
|
3955
3956
|
__privateAdd(this, _respondOverwrites, []);
|
|
3956
3957
|
__privateAdd(this, _calls, []);
|
|
3957
|
-
__privateAdd(this,
|
|
3958
|
+
__privateAdd(this, _overwrittenResponseBodies, /* @__PURE__ */ new Map());
|
|
3958
3959
|
__privateAdd(this, _setOverwrite, (overwriteProp, { overwrite, abort, once }) => {
|
|
3959
3960
|
return once ? [
|
|
3960
3961
|
...overwriteProp.filter(({ once: once2 }) => once2),
|
|
@@ -3967,6 +3968,7 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
3967
3968
|
__privateSet(this, _browser4, browser);
|
|
3968
3969
|
browser.on("network.beforeRequestSent", __privateMethod(this, _WebDriverInterception_instances, handleBeforeRequestSent_fn).bind(this));
|
|
3969
3970
|
browser.on("network.responseStarted", __privateMethod(this, _WebDriverInterception_instances, handleResponseStarted_fn).bind(this));
|
|
3971
|
+
browser.on("network.responseCompleted", __privateMethod(this, _WebDriverInterception_instances, handleResponseCompleted_fn).bind(this));
|
|
3970
3972
|
}
|
|
3971
3973
|
static async initiate(url2, filterOptions, browser) {
|
|
3972
3974
|
const pattern = parseUrlPattern(url2);
|
|
@@ -3974,9 +3976,20 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
3974
3976
|
await browser.sessionSubscribe({
|
|
3975
3977
|
events: [
|
|
3976
3978
|
"network.beforeRequestSent",
|
|
3977
|
-
"network.responseStarted"
|
|
3979
|
+
"network.responseStarted",
|
|
3980
|
+
"network.responseCompleted"
|
|
3978
3981
|
]
|
|
3979
3982
|
});
|
|
3983
|
+
try {
|
|
3984
|
+
if (browser.options.maxSpyCollectedBodySize !== 0) {
|
|
3985
|
+
await browser.networkAddDataCollector({
|
|
3986
|
+
dataTypes: ["response"],
|
|
3987
|
+
maxEncodedDataSize: typeof browser.options.maxSpyCollectedBodySize === "number" ? browser.options.maxSpyCollectedBodySize : DEFAULT_SPY_COLLECTED_BODY_SIZE
|
|
3988
|
+
});
|
|
3989
|
+
}
|
|
3990
|
+
} catch (error) {
|
|
3991
|
+
log8.warn("[BiDi] network.addDataCollector not supported: ".concat(error == null ? void 0 : error.message));
|
|
3992
|
+
}
|
|
3980
3993
|
log8.info("subscribed to network events");
|
|
3981
3994
|
hasSubscribedToEvents = true;
|
|
3982
3995
|
}
|
|
@@ -3999,7 +4012,7 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
3999
4012
|
* @returns {Buffer | null} The binary data as a Buffer, or null if no matching binary response is found
|
|
4000
4013
|
*/
|
|
4001
4014
|
getBinaryResponse(requestId) {
|
|
4002
|
-
const body = __privateGet(this,
|
|
4015
|
+
const body = __privateGet(this, _overwrittenResponseBodies).get(requestId);
|
|
4003
4016
|
if ((body == null ? void 0 : body.type) !== "base64") {
|
|
4004
4017
|
return null;
|
|
4005
4018
|
}
|
|
@@ -4022,7 +4035,7 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
4022
4035
|
}
|
|
4023
4036
|
}
|
|
4024
4037
|
debugResponseBodies() {
|
|
4025
|
-
return __privateGet(this,
|
|
4038
|
+
return __privateGet(this, _overwrittenResponseBodies);
|
|
4026
4039
|
}
|
|
4027
4040
|
/**
|
|
4028
4041
|
* allows access to all requests made with given pattern
|
|
@@ -4035,7 +4048,7 @@ var _WebDriverInterception = class _WebDriverInterception {
|
|
|
4035
4048
|
*/
|
|
4036
4049
|
clear() {
|
|
4037
4050
|
__privateSet(this, _calls, []);
|
|
4038
|
-
__privateGet(this,
|
|
4051
|
+
__privateGet(this, _overwrittenResponseBodies).clear();
|
|
4039
4052
|
return this;
|
|
4040
4053
|
}
|
|
4041
4054
|
/**
|
|
@@ -4173,7 +4186,7 @@ _restored = new WeakMap();
|
|
|
4173
4186
|
_requestOverwrites = new WeakMap();
|
|
4174
4187
|
_respondOverwrites = new WeakMap();
|
|
4175
4188
|
_calls = new WeakMap();
|
|
4176
|
-
|
|
4189
|
+
_overwrittenResponseBodies = new WeakMap();
|
|
4177
4190
|
_WebDriverInterception_instances = new WeakSet();
|
|
4178
4191
|
emit_fn = function(event, args) {
|
|
4179
4192
|
if (!__privateGet(this, _eventHandler).has(event)) {
|
|
@@ -4253,7 +4266,7 @@ handleResponseStarted_fn = function(request) {
|
|
|
4253
4266
|
__privateMethod(this, _WebDriverInterception_instances, emit_fn).call(this, "overwrite", request);
|
|
4254
4267
|
const responseData = parseOverwrite(overwrite, request);
|
|
4255
4268
|
if (responseData.body) {
|
|
4256
|
-
__privateGet(this,
|
|
4269
|
+
__privateGet(this, _overwrittenResponseBodies).set(request.request.request, responseData.body);
|
|
4257
4270
|
}
|
|
4258
4271
|
return __privateGet(this, _browser4).networkProvideResponse({
|
|
4259
4272
|
request: request.request.request,
|
|
@@ -4265,6 +4278,25 @@ handleResponseStarted_fn = function(request) {
|
|
|
4265
4278
|
request: request.request.request
|
|
4266
4279
|
}).catch(__privateMethod(this, _WebDriverInterception_instances, handleNetworkProvideResponseError_fn));
|
|
4267
4280
|
};
|
|
4281
|
+
handleResponseCompleted_fn = async function(request) {
|
|
4282
|
+
if (__privateGet(this, _browser4).options.maxSpyCollectedBodySize === 0 || !__privateGet(this, _pattern).test(request.request.url) || !__privateMethod(this, _WebDriverInterception_instances, matchesFilterOptions_fn).call(this, request)) {
|
|
4283
|
+
return;
|
|
4284
|
+
}
|
|
4285
|
+
try {
|
|
4286
|
+
const { bytes } = await __privateGet(this, _browser4).networkGetData({
|
|
4287
|
+
request: request.request.request,
|
|
4288
|
+
dataType: "response"
|
|
4289
|
+
});
|
|
4290
|
+
if (bytes) {
|
|
4291
|
+
const call2 = __privateGet(this, _calls).find((call3) => call3.request.request === request.request.request);
|
|
4292
|
+
if (call2) {
|
|
4293
|
+
call2.body = bytes.value;
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4296
|
+
} catch (err) {
|
|
4297
|
+
log8.debug("Failed to get response body for ".concat(request.request.request, ": ").concat(err.message));
|
|
4298
|
+
}
|
|
4299
|
+
};
|
|
4268
4300
|
/**
|
|
4269
4301
|
* It appears that the networkProvideResponse method may throw an "no such request" error even though the request
|
|
4270
4302
|
* is marked as "blocked", in these cases we can safely ignore the error.
|
|
@@ -4607,7 +4639,7 @@ var log13 = logger13("webdriverio:ShadowRootManager");
|
|
|
4607
4639
|
function getShadowRootManager(browser) {
|
|
4608
4640
|
return SessionManager.getSessionManager(browser, ShadowRootManager);
|
|
4609
4641
|
}
|
|
4610
|
-
var _browser6, _initialize2, _shadowRoots, _documentElement, _frameDepth, _handleLogEntryListener, _commandResultHandlerListener, _handleBidiCommandListener, _ShadowRootManager_instances, handleBidiCommand_fn, commandResultHandler_fn;
|
|
4642
|
+
var _browser6, _initialize2, _shadowRoots, _currentDocumentIds, _documentElement, _frameDepth, _handleLogEntryListener, _commandResultHandlerListener, _handleBidiCommandListener, _ShadowRootManager_instances, handleBidiCommand_fn, commandResultHandler_fn;
|
|
4611
4643
|
var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
4612
4644
|
constructor(browser) {
|
|
4613
4645
|
super(browser, _ShadowRootManager.name);
|
|
@@ -4615,6 +4647,7 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4615
4647
|
__privateAdd(this, _browser6);
|
|
4616
4648
|
__privateAdd(this, _initialize2);
|
|
4617
4649
|
__privateAdd(this, _shadowRoots, /* @__PURE__ */ new Map());
|
|
4650
|
+
__privateAdd(this, _currentDocumentIds, /* @__PURE__ */ new Map());
|
|
4618
4651
|
__privateAdd(this, _documentElement);
|
|
4619
4652
|
__privateAdd(this, _frameDepth, 0);
|
|
4620
4653
|
__privateAdd(this, _handleLogEntryListener, this.handleLogEntry.bind(this));
|
|
@@ -4655,7 +4688,7 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4655
4688
|
* capture shadow root elements propagated through console.debug
|
|
4656
4689
|
*/
|
|
4657
4690
|
handleLogEntry(logEntry) {
|
|
4658
|
-
var _a, _b, _c, _d;
|
|
4691
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4659
4692
|
const args = "args" in logEntry && logEntry.level === "debug" ? logEntry.args : void 0;
|
|
4660
4693
|
if (!args || args[0].type !== "string" || args[0].value !== "[WDIO]" || args[1].type !== "string") {
|
|
4661
4694
|
return;
|
|
@@ -4675,6 +4708,19 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4675
4708
|
isDocument,
|
|
4676
4709
|
documentElement
|
|
4677
4710
|
] = args;
|
|
4711
|
+
const ctxId = logEntry.source.context;
|
|
4712
|
+
if (shadowElem.sharedId) {
|
|
4713
|
+
const docMatch = shadowElem.sharedId.match(/\.d\.([A-F0-9]+)\./);
|
|
4714
|
+
if (docMatch) {
|
|
4715
|
+
const newDocId = docMatch[1];
|
|
4716
|
+
const currentDocId = __privateGet(this, _currentDocumentIds).get(ctxId);
|
|
4717
|
+
if (currentDocId && currentDocId !== newDocId) {
|
|
4718
|
+
log13.info("Document changed in context ".concat(ctxId, ": ").concat(currentDocId, " -> ").concat(newDocId, ", purging ").concat((_b = (_a = __privateGet(this, _shadowRoots).get(ctxId)) == null ? void 0 : _a.flat().length) != null ? _b : 0, " stale shadow roots"));
|
|
4719
|
+
__privateGet(this, _shadowRoots).delete(ctxId);
|
|
4720
|
+
}
|
|
4721
|
+
__privateGet(this, _currentDocumentIds).set(ctxId, newDocId);
|
|
4722
|
+
}
|
|
4723
|
+
}
|
|
4678
4724
|
if (!__privateGet(this, _shadowRoots).has(logEntry.source.context)) {
|
|
4679
4725
|
if (!rootElem.sharedId) {
|
|
4680
4726
|
throw new Error('Expected "sharedId" parameter from object '.concat(rootElem));
|
|
@@ -4697,10 +4743,10 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4697
4743
|
if (
|
|
4698
4744
|
// we expect an element id
|
|
4699
4745
|
!shadowElem.sharedId || // we expect the element to have a shadow root
|
|
4700
|
-
!((
|
|
4701
|
-
((
|
|
4746
|
+
!((_d = (_c = shadowElem.value) == null ? void 0 : _c.shadowRoot) == null ? void 0 : _d.sharedId) || // we expect the shadow root to have a proper type
|
|
4747
|
+
((_e = shadowElem.value.shadowRoot.value) == null ? void 0 : _e.nodeType) !== 11
|
|
4702
4748
|
) {
|
|
4703
|
-
return log13.warn("Expected element with shadow root but found <".concat((
|
|
4749
|
+
return log13.warn("Expected element with shadow root but found <".concat((_f = shadowElem.value) == null ? void 0 : _f.localName, " />"));
|
|
4704
4750
|
}
|
|
4705
4751
|
log13.info("Registered new shadow root for element <".concat(shadowElem.value.localName, " /> with id ").concat(shadowElem.value.shadowRoot.sharedId));
|
|
4706
4752
|
const newTree = new ShadowRootTree(
|
|
@@ -4715,7 +4761,10 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4715
4761
|
}
|
|
4716
4762
|
return;
|
|
4717
4763
|
}
|
|
4718
|
-
if (eventType === "removeShadowRoot" && args[2].type === "node"
|
|
4764
|
+
if (eventType === "removeShadowRoot" && args[2].type === "node") {
|
|
4765
|
+
if (!args[2].sharedId) {
|
|
4766
|
+
return log13.warn("Received removeShadowRoot event without sharedId, element may have been garbage collected");
|
|
4767
|
+
}
|
|
4719
4768
|
const tree = __privateGet(this, _shadowRoots).get(logEntry.source.context);
|
|
4720
4769
|
if (!tree) {
|
|
4721
4770
|
return;
|
|
@@ -4780,6 +4829,7 @@ var _ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4780
4829
|
_browser6 = new WeakMap();
|
|
4781
4830
|
_initialize2 = new WeakMap();
|
|
4782
4831
|
_shadowRoots = new WeakMap();
|
|
4832
|
+
_currentDocumentIds = new WeakMap();
|
|
4783
4833
|
_documentElement = new WeakMap();
|
|
4784
4834
|
_frameDepth = new WeakMap();
|
|
4785
4835
|
_handleLogEntryListener = new WeakMap();
|
|
@@ -4795,6 +4845,7 @@ handleBidiCommand_fn = function(command) {
|
|
|
4795
4845
|
}
|
|
4796
4846
|
const params = command.params;
|
|
4797
4847
|
__privateGet(this, _shadowRoots).delete(params.context);
|
|
4848
|
+
__privateGet(this, _currentDocumentIds).delete(params.context);
|
|
4798
4849
|
};
|
|
4799
4850
|
/**
|
|
4800
4851
|
* keep track of frame depth
|
|
@@ -4825,6 +4876,11 @@ var ShadowRootTree = class _ShadowRootTree {
|
|
|
4825
4876
|
throw new Error('Method "addShadowElement" expects at least 2 arguments');
|
|
4826
4877
|
}
|
|
4827
4878
|
if (scope instanceof _ShadowRootTree) {
|
|
4879
|
+
for (const child of this.children) {
|
|
4880
|
+
if (child.element === scope.element) {
|
|
4881
|
+
return;
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4828
4884
|
this.children.add(scope);
|
|
4829
4885
|
return;
|
|
4830
4886
|
}
|
|
@@ -9537,16 +9593,50 @@ async function findDeepElement(selector) {
|
|
|
9537
9593
|
}));
|
|
9538
9594
|
nodes = returnUniqueNodes(nodes);
|
|
9539
9595
|
if (!this.elementId) {
|
|
9596
|
+
if (shadowRoots.length > 0 && nodes.length > 0) {
|
|
9597
|
+
for (const node of nodes) {
|
|
9598
|
+
try {
|
|
9599
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9600
|
+
if (connected) {
|
|
9601
|
+
return node;
|
|
9602
|
+
}
|
|
9603
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9604
|
+
} catch {
|
|
9605
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9606
|
+
}
|
|
9607
|
+
}
|
|
9608
|
+
log29.warn("All ".concat(nodes.length, ' BiDi results for "').concat(value, '" are detached, removed stale entries from shadow root tree'));
|
|
9609
|
+
return void 0;
|
|
9610
|
+
}
|
|
9540
9611
|
return nodes[0];
|
|
9541
9612
|
}
|
|
9542
9613
|
const scopedNodes = await Promise.all(nodes.map(async (node) => {
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9614
|
+
try {
|
|
9615
|
+
const isIn = await browser.execute(
|
|
9616
|
+
elementContains,
|
|
9617
|
+
{ [ELEMENT_KEY20]: this.elementId },
|
|
9618
|
+
node
|
|
9619
|
+
);
|
|
9620
|
+
return [isIn, node];
|
|
9621
|
+
} catch {
|
|
9622
|
+
return [false, node];
|
|
9623
|
+
}
|
|
9549
9624
|
})).then((elems) => elems.filter(([isIn]) => isIn).map(([, elem]) => elem));
|
|
9625
|
+
for (const node of scopedNodes) {
|
|
9626
|
+
try {
|
|
9627
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9628
|
+
if (connected) {
|
|
9629
|
+
return node;
|
|
9630
|
+
}
|
|
9631
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9632
|
+
} catch {
|
|
9633
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9634
|
+
}
|
|
9635
|
+
}
|
|
9636
|
+
if (scopedNodes.length > 0) {
|
|
9637
|
+
log29.warn("All ".concat(scopedNodes.length, ' scoped BiDi results for "').concat(value, '" are detached, removed stale entries from shadow root tree'));
|
|
9638
|
+
return void 0;
|
|
9639
|
+
}
|
|
9550
9640
|
return scopedNodes[0];
|
|
9551
9641
|
}, (err) => {
|
|
9552
9642
|
log29.warn("Failed to execute browser.browsingContextLocateNodes({ ... }) due to ".concat(err, ", falling back to regular WebDriver Classic command"));
|
|
@@ -9576,16 +9666,58 @@ async function findDeepElements(selector) {
|
|
|
9576
9666
|
}));
|
|
9577
9667
|
nodes = returnUniqueNodes(nodes);
|
|
9578
9668
|
if (!this.elementId) {
|
|
9669
|
+
if (shadowRoots.length > 0 && nodes.length > 0) {
|
|
9670
|
+
const validNodes = [];
|
|
9671
|
+
for (const node of nodes) {
|
|
9672
|
+
try {
|
|
9673
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9674
|
+
if (connected) {
|
|
9675
|
+
validNodes.push(node);
|
|
9676
|
+
} else {
|
|
9677
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9678
|
+
}
|
|
9679
|
+
} catch {
|
|
9680
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9681
|
+
}
|
|
9682
|
+
}
|
|
9683
|
+
if (validNodes.length > 0) {
|
|
9684
|
+
return validNodes;
|
|
9685
|
+
}
|
|
9686
|
+
return [];
|
|
9687
|
+
}
|
|
9579
9688
|
return nodes;
|
|
9580
9689
|
}
|
|
9581
9690
|
const scopedNodes = await Promise.all(nodes.map(async (node) => {
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9691
|
+
try {
|
|
9692
|
+
const isIn = await browser.execute(
|
|
9693
|
+
elementContains,
|
|
9694
|
+
{ [ELEMENT_KEY20]: this.elementId },
|
|
9695
|
+
node
|
|
9696
|
+
);
|
|
9697
|
+
return [isIn, node];
|
|
9698
|
+
} catch {
|
|
9699
|
+
return [false, node];
|
|
9700
|
+
}
|
|
9588
9701
|
})).then((elems) => elems.filter(([isIn]) => isIn).map(([, elem]) => elem));
|
|
9702
|
+
const connectedScopedNodes = [];
|
|
9703
|
+
for (const node of scopedNodes) {
|
|
9704
|
+
try {
|
|
9705
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9706
|
+
if (connected) {
|
|
9707
|
+
connectedScopedNodes.push(node);
|
|
9708
|
+
} else {
|
|
9709
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9710
|
+
}
|
|
9711
|
+
} catch {
|
|
9712
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9713
|
+
}
|
|
9714
|
+
}
|
|
9715
|
+
if (connectedScopedNodes.length > 0) {
|
|
9716
|
+
return connectedScopedNodes;
|
|
9717
|
+
}
|
|
9718
|
+
if (scopedNodes.length > 0) {
|
|
9719
|
+
return [];
|
|
9720
|
+
}
|
|
9589
9721
|
return scopedNodes;
|
|
9590
9722
|
}, (err) => {
|
|
9591
9723
|
log29.warn("Failed to execute browser.browsingContextLocateNodes({ ... }) due to ".concat(err, ", falling back to regular WebDriver Classic command"));
|
package/build/node.js
CHANGED
|
@@ -3752,7 +3752,7 @@ async function executeAsync(script, ...args) {
|
|
|
3752
3752
|
// src/commands/browser/getCookies.ts
|
|
3753
3753
|
import logger7 from "@wdio/logger";
|
|
3754
3754
|
var log7 = logger7("webdriverio");
|
|
3755
|
-
async function getCookies(filter) {
|
|
3755
|
+
async function getCookies(filter, sourceOrigin) {
|
|
3756
3756
|
const usesMultipleFilter = Array.isArray(filter) && filter.length > 1;
|
|
3757
3757
|
if (!this.isBidi || usesMultipleFilter) {
|
|
3758
3758
|
return getCookiesClassic.call(this, filter);
|
|
@@ -3767,10 +3767,10 @@ async function getCookies(filter) {
|
|
|
3767
3767
|
} catch {
|
|
3768
3768
|
return getCookiesClassic.call(this, filter);
|
|
3769
3769
|
}
|
|
3770
|
-
const params = {
|
|
3770
|
+
const params = sourceOrigin === null ? {} : {
|
|
3771
3771
|
partition: {
|
|
3772
3772
|
type: "storageKey",
|
|
3773
|
-
sourceOrigin: url2.origin
|
|
3773
|
+
sourceOrigin: sourceOrigin || url2.origin
|
|
3774
3774
|
}
|
|
3775
3775
|
};
|
|
3776
3776
|
if (typeof cookieFilter !== "undefined") {
|
|
@@ -4121,6 +4121,7 @@ function getPatternParam(pattern, key) {
|
|
|
4121
4121
|
|
|
4122
4122
|
// src/utils/interception/index.ts
|
|
4123
4123
|
var log9 = logger9("WebDriverInterception");
|
|
4124
|
+
var DEFAULT_SPY_COLLECTED_BODY_SIZE = 10 * 1024 * 1024;
|
|
4124
4125
|
var hasSubscribedToEvents = false;
|
|
4125
4126
|
var WebDriverInterception = class _WebDriverInterception {
|
|
4126
4127
|
#pattern;
|
|
@@ -4132,7 +4133,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4132
4133
|
#requestOverwrites = [];
|
|
4133
4134
|
#respondOverwrites = [];
|
|
4134
4135
|
#calls = [];
|
|
4135
|
-
#
|
|
4136
|
+
#overwrittenResponseBodies = /* @__PURE__ */ new Map();
|
|
4136
4137
|
constructor(pattern, mockId, filterOptions, browser) {
|
|
4137
4138
|
this.#pattern = pattern;
|
|
4138
4139
|
this.#mockId = mockId;
|
|
@@ -4140,6 +4141,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4140
4141
|
this.#browser = browser;
|
|
4141
4142
|
browser.on("network.beforeRequestSent", this.#handleBeforeRequestSent.bind(this));
|
|
4142
4143
|
browser.on("network.responseStarted", this.#handleResponseStarted.bind(this));
|
|
4144
|
+
browser.on("network.responseCompleted", this.#handleResponseCompleted.bind(this));
|
|
4143
4145
|
}
|
|
4144
4146
|
static async initiate(url2, filterOptions, browser) {
|
|
4145
4147
|
const pattern = parseUrlPattern(url2);
|
|
@@ -4147,9 +4149,20 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4147
4149
|
await browser.sessionSubscribe({
|
|
4148
4150
|
events: [
|
|
4149
4151
|
"network.beforeRequestSent",
|
|
4150
|
-
"network.responseStarted"
|
|
4152
|
+
"network.responseStarted",
|
|
4153
|
+
"network.responseCompleted"
|
|
4151
4154
|
]
|
|
4152
4155
|
});
|
|
4156
|
+
try {
|
|
4157
|
+
if (browser.options.maxSpyCollectedBodySize !== 0) {
|
|
4158
|
+
await browser.networkAddDataCollector({
|
|
4159
|
+
dataTypes: ["response"],
|
|
4160
|
+
maxEncodedDataSize: typeof browser.options.maxSpyCollectedBodySize === "number" ? browser.options.maxSpyCollectedBodySize : DEFAULT_SPY_COLLECTED_BODY_SIZE
|
|
4161
|
+
});
|
|
4162
|
+
}
|
|
4163
|
+
} catch (error) {
|
|
4164
|
+
log9.warn(`[BiDi] network.addDataCollector not supported: ${error?.message}`);
|
|
4165
|
+
}
|
|
4153
4166
|
log9.info("subscribed to network events");
|
|
4154
4167
|
hasSubscribedToEvents = true;
|
|
4155
4168
|
}
|
|
@@ -4242,7 +4255,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4242
4255
|
this.#emit("overwrite", request);
|
|
4243
4256
|
const responseData = parseOverwrite(overwrite, request);
|
|
4244
4257
|
if (responseData.body) {
|
|
4245
|
-
this.#
|
|
4258
|
+
this.#overwrittenResponseBodies.set(request.request.request, responseData.body);
|
|
4246
4259
|
}
|
|
4247
4260
|
return this.#browser.networkProvideResponse({
|
|
4248
4261
|
request: request.request.request,
|
|
@@ -4254,6 +4267,25 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4254
4267
|
request: request.request.request
|
|
4255
4268
|
}).catch(this.#handleNetworkProvideResponseError);
|
|
4256
4269
|
}
|
|
4270
|
+
async #handleResponseCompleted(request) {
|
|
4271
|
+
if (this.#browser.options.maxSpyCollectedBodySize === 0 || !this.#pattern.test(request.request.url) || !this.#matchesFilterOptions(request)) {
|
|
4272
|
+
return;
|
|
4273
|
+
}
|
|
4274
|
+
try {
|
|
4275
|
+
const { bytes } = await this.#browser.networkGetData({
|
|
4276
|
+
request: request.request.request,
|
|
4277
|
+
dataType: "response"
|
|
4278
|
+
});
|
|
4279
|
+
if (bytes) {
|
|
4280
|
+
const call2 = this.#calls.find((call3) => call3.request.request === request.request.request);
|
|
4281
|
+
if (call2) {
|
|
4282
|
+
call2.body = bytes.value;
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
} catch (err) {
|
|
4286
|
+
log9.debug(`Failed to get response body for ${request.request.request}: ${err.message}`);
|
|
4287
|
+
}
|
|
4288
|
+
}
|
|
4257
4289
|
/**
|
|
4258
4290
|
* It appears that the networkProvideResponse method may throw an "no such request" error even though the request
|
|
4259
4291
|
* is marked as "blocked", in these cases we can safely ignore the error.
|
|
@@ -4271,7 +4303,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4271
4303
|
* @returns {Buffer | null} The binary data as a Buffer, or null if no matching binary response is found
|
|
4272
4304
|
*/
|
|
4273
4305
|
getBinaryResponse(requestId) {
|
|
4274
|
-
const body = this.#
|
|
4306
|
+
const body = this.#overwrittenResponseBodies.get(requestId);
|
|
4275
4307
|
if (body?.type !== "base64") {
|
|
4276
4308
|
return null;
|
|
4277
4309
|
}
|
|
@@ -4294,7 +4326,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4294
4326
|
}
|
|
4295
4327
|
}
|
|
4296
4328
|
debugResponseBodies() {
|
|
4297
|
-
return this.#
|
|
4329
|
+
return this.#overwrittenResponseBodies;
|
|
4298
4330
|
}
|
|
4299
4331
|
#isRequestMatching(request) {
|
|
4300
4332
|
const matches = this.#pattern && this.#pattern.test(request.request.url);
|
|
@@ -4351,7 +4383,7 @@ var WebDriverInterception = class _WebDriverInterception {
|
|
|
4351
4383
|
*/
|
|
4352
4384
|
clear() {
|
|
4353
4385
|
this.#calls = [];
|
|
4354
|
-
this.#
|
|
4386
|
+
this.#overwrittenResponseBodies.clear();
|
|
4355
4387
|
return this;
|
|
4356
4388
|
}
|
|
4357
4389
|
/**
|
|
@@ -4690,6 +4722,7 @@ var ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4690
4722
|
#browser;
|
|
4691
4723
|
#initialize;
|
|
4692
4724
|
#shadowRoots = /* @__PURE__ */ new Map();
|
|
4725
|
+
#currentDocumentIds = /* @__PURE__ */ new Map();
|
|
4693
4726
|
#documentElement;
|
|
4694
4727
|
#frameDepth = 0;
|
|
4695
4728
|
#handleLogEntryListener = this.handleLogEntry.bind(this);
|
|
@@ -4730,6 +4763,7 @@ var ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4730
4763
|
}
|
|
4731
4764
|
const params = command.params;
|
|
4732
4765
|
this.#shadowRoots.delete(params.context);
|
|
4766
|
+
this.#currentDocumentIds.delete(params.context);
|
|
4733
4767
|
}
|
|
4734
4768
|
/**
|
|
4735
4769
|
* keep track of frame depth
|
|
@@ -4773,6 +4807,19 @@ var ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4773
4807
|
isDocument,
|
|
4774
4808
|
documentElement
|
|
4775
4809
|
] = args;
|
|
4810
|
+
const ctxId = logEntry.source.context;
|
|
4811
|
+
if (shadowElem.sharedId) {
|
|
4812
|
+
const docMatch = shadowElem.sharedId.match(/\.d\.([A-F0-9]+)\./);
|
|
4813
|
+
if (docMatch) {
|
|
4814
|
+
const newDocId = docMatch[1];
|
|
4815
|
+
const currentDocId = this.#currentDocumentIds.get(ctxId);
|
|
4816
|
+
if (currentDocId && currentDocId !== newDocId) {
|
|
4817
|
+
log14.info(`Document changed in context ${ctxId}: ${currentDocId} -> ${newDocId}, purging ${this.#shadowRoots.get(ctxId)?.flat().length ?? 0} stale shadow roots`);
|
|
4818
|
+
this.#shadowRoots.delete(ctxId);
|
|
4819
|
+
}
|
|
4820
|
+
this.#currentDocumentIds.set(ctxId, newDocId);
|
|
4821
|
+
}
|
|
4822
|
+
}
|
|
4776
4823
|
if (!this.#shadowRoots.has(logEntry.source.context)) {
|
|
4777
4824
|
if (!rootElem.sharedId) {
|
|
4778
4825
|
throw new Error(`Expected "sharedId" parameter from object ${rootElem}`);
|
|
@@ -4813,7 +4860,10 @@ var ShadowRootManager = class _ShadowRootManager extends SessionManager {
|
|
|
4813
4860
|
}
|
|
4814
4861
|
return;
|
|
4815
4862
|
}
|
|
4816
|
-
if (eventType === "removeShadowRoot" && args[2].type === "node"
|
|
4863
|
+
if (eventType === "removeShadowRoot" && args[2].type === "node") {
|
|
4864
|
+
if (!args[2].sharedId) {
|
|
4865
|
+
return log14.warn("Received removeShadowRoot event without sharedId, element may have been garbage collected");
|
|
4866
|
+
}
|
|
4817
4867
|
const tree = this.#shadowRoots.get(logEntry.source.context);
|
|
4818
4868
|
if (!tree) {
|
|
4819
4869
|
return;
|
|
@@ -4890,6 +4940,11 @@ var ShadowRootTree = class _ShadowRootTree {
|
|
|
4890
4940
|
throw new Error('Method "addShadowElement" expects at least 2 arguments');
|
|
4891
4941
|
}
|
|
4892
4942
|
if (scope instanceof _ShadowRootTree) {
|
|
4943
|
+
for (const child of this.children) {
|
|
4944
|
+
if (child.element === scope.element) {
|
|
4945
|
+
return;
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4893
4948
|
this.children.add(scope);
|
|
4894
4949
|
return;
|
|
4895
4950
|
}
|
|
@@ -9206,16 +9261,50 @@ async function findDeepElement(selector) {
|
|
|
9206
9261
|
}));
|
|
9207
9262
|
nodes = returnUniqueNodes(nodes);
|
|
9208
9263
|
if (!this.elementId) {
|
|
9264
|
+
if (shadowRoots.length > 0 && nodes.length > 0) {
|
|
9265
|
+
for (const node of nodes) {
|
|
9266
|
+
try {
|
|
9267
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9268
|
+
if (connected) {
|
|
9269
|
+
return node;
|
|
9270
|
+
}
|
|
9271
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9272
|
+
} catch {
|
|
9273
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9276
|
+
log30.warn(`All ${nodes.length} BiDi results for "${value}" are detached, removed stale entries from shadow root tree`);
|
|
9277
|
+
return void 0;
|
|
9278
|
+
}
|
|
9209
9279
|
return nodes[0];
|
|
9210
9280
|
}
|
|
9211
9281
|
const scopedNodes = await Promise.all(nodes.map(async (node) => {
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9282
|
+
try {
|
|
9283
|
+
const isIn = await browser.execute(
|
|
9284
|
+
elementContains,
|
|
9285
|
+
{ [ELEMENT_KEY20]: this.elementId },
|
|
9286
|
+
node
|
|
9287
|
+
);
|
|
9288
|
+
return [isIn, node];
|
|
9289
|
+
} catch {
|
|
9290
|
+
return [false, node];
|
|
9291
|
+
}
|
|
9218
9292
|
})).then((elems) => elems.filter(([isIn]) => isIn).map(([, elem]) => elem));
|
|
9293
|
+
for (const node of scopedNodes) {
|
|
9294
|
+
try {
|
|
9295
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9296
|
+
if (connected) {
|
|
9297
|
+
return node;
|
|
9298
|
+
}
|
|
9299
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9300
|
+
} catch {
|
|
9301
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9302
|
+
}
|
|
9303
|
+
}
|
|
9304
|
+
if (scopedNodes.length > 0) {
|
|
9305
|
+
log30.warn(`All ${scopedNodes.length} scoped BiDi results for "${value}" are detached, removed stale entries from shadow root tree`);
|
|
9306
|
+
return void 0;
|
|
9307
|
+
}
|
|
9219
9308
|
return scopedNodes[0];
|
|
9220
9309
|
}, (err) => {
|
|
9221
9310
|
log30.warn(`Failed to execute browser.browsingContextLocateNodes({ ... }) due to ${err}, falling back to regular WebDriver Classic command`);
|
|
@@ -9245,16 +9334,58 @@ async function findDeepElements(selector) {
|
|
|
9245
9334
|
}));
|
|
9246
9335
|
nodes = returnUniqueNodes(nodes);
|
|
9247
9336
|
if (!this.elementId) {
|
|
9337
|
+
if (shadowRoots.length > 0 && nodes.length > 0) {
|
|
9338
|
+
const validNodes = [];
|
|
9339
|
+
for (const node of nodes) {
|
|
9340
|
+
try {
|
|
9341
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9342
|
+
if (connected) {
|
|
9343
|
+
validNodes.push(node);
|
|
9344
|
+
} else {
|
|
9345
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9346
|
+
}
|
|
9347
|
+
} catch {
|
|
9348
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9349
|
+
}
|
|
9350
|
+
}
|
|
9351
|
+
if (validNodes.length > 0) {
|
|
9352
|
+
return validNodes;
|
|
9353
|
+
}
|
|
9354
|
+
return [];
|
|
9355
|
+
}
|
|
9248
9356
|
return nodes;
|
|
9249
9357
|
}
|
|
9250
9358
|
const scopedNodes = await Promise.all(nodes.map(async (node) => {
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9359
|
+
try {
|
|
9360
|
+
const isIn = await browser.execute(
|
|
9361
|
+
elementContains,
|
|
9362
|
+
{ [ELEMENT_KEY20]: this.elementId },
|
|
9363
|
+
node
|
|
9364
|
+
);
|
|
9365
|
+
return [isIn, node];
|
|
9366
|
+
} catch {
|
|
9367
|
+
return [false, node];
|
|
9368
|
+
}
|
|
9257
9369
|
})).then((elems) => elems.filter(([isIn]) => isIn).map(([, elem]) => elem));
|
|
9370
|
+
const connectedScopedNodes = [];
|
|
9371
|
+
for (const node of scopedNodes) {
|
|
9372
|
+
try {
|
|
9373
|
+
const connected = await browser.execute((el) => el.isConnected, node);
|
|
9374
|
+
if (connected) {
|
|
9375
|
+
connectedScopedNodes.push(node);
|
|
9376
|
+
} else {
|
|
9377
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9378
|
+
}
|
|
9379
|
+
} catch {
|
|
9380
|
+
shadowRootManager.deleteShadowRoot(node[ELEMENT_KEY20], context);
|
|
9381
|
+
}
|
|
9382
|
+
}
|
|
9383
|
+
if (connectedScopedNodes.length > 0) {
|
|
9384
|
+
return connectedScopedNodes;
|
|
9385
|
+
}
|
|
9386
|
+
if (scopedNodes.length > 0) {
|
|
9387
|
+
return [];
|
|
9388
|
+
}
|
|
9258
9389
|
return scopedNodes;
|
|
9259
9390
|
}, (err) => {
|
|
9260
9391
|
log30.warn(`Failed to execute browser.browsingContextLocateNodes({ ... }) due to ${err}, falling back to regular WebDriver Classic command`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadowRoot.d.ts","sourceRoot":"","sources":["../../src/session/shadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAK7C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,qBAEhE;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;;
|
|
1
|
+
{"version":3,"file":"shadowRoot.d.ts","sourceRoot":"","sources":["../../src/session/shadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAK7C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,qBAEhE;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;;gBAYrC,OAAO,EAAE,WAAW,CAAC,OAAO;IA0BxC,eAAe,IAAI,IAAI;IAOjB,UAAU;IA6BhB;;;OAGG;IACH,aAAa;IAIb;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC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,EACjD,UAAU,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,EAC/D,kBAAgB,EAChB,QAAO,OAAO,EAAO,6BAwCxB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,qBAAqB,MAAM,+CAAgD,CAAA;AAElG;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC7B,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAShC,CAAA;AAED,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,UAKhF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JsonCompatible } from '@wdio/types';
|
|
2
2
|
import { type local, type remote } from 'webdriver';
|
|
3
3
|
import { URLPattern } from 'urlpattern-polyfill';
|
|
4
|
-
import type { MockFilterOptions, RequestWithOptions, RespondWithOptions } from './types.js';
|
|
4
|
+
import type { MockFilterOptions, RequestWithOptions, RespondWithOptions, Response } from './types.js';
|
|
5
5
|
import type { WaitForOptions } from '../../types.js';
|
|
6
6
|
type RespondBody = string | JsonCompatible | Buffer;
|
|
7
7
|
/**
|
|
@@ -24,12 +24,12 @@ export default class WebDriverInterception {
|
|
|
24
24
|
* Simulate a responseStarted event for testing purposes
|
|
25
25
|
* @param request NetworkResponseCompletedParameters to simulate
|
|
26
26
|
*/
|
|
27
|
-
simulateResponseStarted(request:
|
|
27
|
+
simulateResponseStarted(request: Response): void;
|
|
28
28
|
debugResponseBodies(): Map<string, remote.NetworkBytesValue>;
|
|
29
29
|
/**
|
|
30
30
|
* allows access to all requests made with given pattern
|
|
31
31
|
*/
|
|
32
|
-
get calls():
|
|
32
|
+
get calls(): Response[];
|
|
33
33
|
/**
|
|
34
34
|
* Resets all information stored in the `mock.calls` set.
|
|
35
35
|
*/
|
|
@@ -92,7 +92,7 @@ export default class WebDriverInterception {
|
|
|
92
92
|
on(event: 'match', callback: (match: local.NetworkBeforeRequestSentParameters) => void): WebDriverInterception;
|
|
93
93
|
on(event: 'continue', callback: (requestId: string) => void): WebDriverInterception;
|
|
94
94
|
on(event: 'fail', callback: (requestId: string) => void): WebDriverInterception;
|
|
95
|
-
on(event: 'overwrite', callback: (response:
|
|
95
|
+
on(event: 'overwrite', callback: (response: Response) => void): WebDriverInterception;
|
|
96
96
|
waitForResponse({ timeout, interval, timeoutMsg, }?: WaitForOptions): Promise<boolean> | Promise<Promise<boolean>>;
|
|
97
97
|
}
|
|
98
98
|
export declare function parseUrlPattern(url: string | URLPattern): URLPattern;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAKhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAQpD,KAAK,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,MAAM,CAAA;AAOnD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EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,kCAAkC,KAAK,IAAI,GAAG,qBAAqB;IAClH,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,kCAAkC,KAAK,IAAI,GAAG,qBAAqB;IAC9G,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,qBAAqB;IACnF,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,qBAAqB;IAC/E,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,qBAAqB;IAarF,eAAe,CAAC,EACZ,OAA8C,EAC9C,QAAgD,EAChD,UAAU,GACb,GAAE,cAAmB;CA2BzB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,cAqBvD"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { local } from 'webdriver';
|
|
2
2
|
import type { Cookie } from '@wdio/protocols';
|
|
3
|
+
export interface Response extends local.NetworkResponseCompletedParameters {
|
|
4
|
+
body?: string;
|
|
5
|
+
}
|
|
3
6
|
export type MockFilterOptions = {
|
|
4
7
|
method?: string | ((method: string) => boolean);
|
|
5
8
|
requestHeaders?: Record<string, string> | ((headers: Record<string, string>) => boolean);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/interception/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,MAAM,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AA;AAE/E,MAAM,WAAW,kBAAkB;IAE/B,IAAI,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;IACvE,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;IACrF,MAAM,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;IACrE,GAAG,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;CACpE;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,KAAK,GAAG,QAAQ,CAAC;IAClF,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAA;CAC3E;AAED,MAAM,WAAW,kBAAkB;IAC/B,WAAW,CAAC,EAAE,kBAAkB,CAAA;CACnC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriverio",
|
|
3
3
|
"description": "Next-gen browser and mobile automation test framework for Node.js",
|
|
4
|
-
"version": "9.27.
|
|
4
|
+
"version": "9.27.1",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@types/node": "^20.11.30",
|
|
79
79
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
80
|
-
"@wdio/config": "9.27.
|
|
80
|
+
"@wdio/config": "9.27.1",
|
|
81
81
|
"@wdio/logger": "9.18.0",
|
|
82
|
-
"@wdio/protocols": "9.27.
|
|
82
|
+
"@wdio/protocols": "9.27.1",
|
|
83
83
|
"@wdio/repl": "9.16.2",
|
|
84
|
-
"@wdio/types": "9.27.
|
|
85
|
-
"@wdio/utils": "9.27.
|
|
84
|
+
"@wdio/types": "9.27.1",
|
|
85
|
+
"@wdio/utils": "9.27.1",
|
|
86
86
|
"archiver": "^7.0.1",
|
|
87
87
|
"aria-query": "^5.3.0",
|
|
88
88
|
"cheerio": "^1.0.0-rc.12",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"rgb2hex": "0.2.5",
|
|
100
100
|
"serialize-error": "^12.0.0",
|
|
101
101
|
"urlpattern-polyfill": "^10.0.0",
|
|
102
|
-
"webdriver": "9.27.
|
|
102
|
+
"webdriver": "9.27.1"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"puppeteer-core": ">=22.x || <=24.x"
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"optional": true
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "e2b5652f61da0858251860e7d3bc0c0aaffbb525"
|
|
113
113
|
}
|