webdriverio 9.2.11 → 9.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -4187,7 +4187,7 @@ import { ELEMENT_KEY as ELEMENT_KEY8 } from "webdriver";
|
|
|
4187
4187
|
var log13 = logger13("webdriverio:switchFrame");
|
|
4188
4188
|
async function switchFrame(context) {
|
|
4189
4189
|
function isPossiblyUnresolvedElement(input) {
|
|
4190
|
-
return typeof input === "object" && typeof input.getElement === "function";
|
|
4190
|
+
return Boolean(input) && typeof input === "object" && typeof input.getElement === "function";
|
|
4191
4191
|
}
|
|
4192
4192
|
if (!this.isBidi) {
|
|
4193
4193
|
if (typeof context === "function") {
|
|
@@ -5196,6 +5196,7 @@ var ShadowRootManager = class {
|
|
|
5196
5196
|
#browser;
|
|
5197
5197
|
#initialize;
|
|
5198
5198
|
#shadowRoots = /* @__PURE__ */ new Map();
|
|
5199
|
+
#documentElement;
|
|
5199
5200
|
#frameDepth = 0;
|
|
5200
5201
|
constructor(browser) {
|
|
5201
5202
|
this.#browser = browser;
|
|
@@ -5264,7 +5265,8 @@ var ShadowRootManager = class {
|
|
|
5264
5265
|
,
|
|
5265
5266
|
shadowElem,
|
|
5266
5267
|
rootElem,
|
|
5267
|
-
isDocument
|
|
5268
|
+
isDocument,
|
|
5269
|
+
documentElement
|
|
5268
5270
|
] = args;
|
|
5269
5271
|
if (!this.#shadowRoots.has(logEntry.source.context)) {
|
|
5270
5272
|
if (!rootElem.sharedId) {
|
|
@@ -5280,6 +5282,7 @@ var ShadowRootManager = class {
|
|
|
5280
5282
|
this.#shadowRoots.set(logEntry.source.context, new ShadowRootTree(rootElem.sharedId));
|
|
5281
5283
|
}
|
|
5282
5284
|
}
|
|
5285
|
+
this.#documentElement = documentElement;
|
|
5283
5286
|
const tree = this.#shadowRoots.get(logEntry.source.context);
|
|
5284
5287
|
if (!tree) {
|
|
5285
5288
|
throw new Error(`Couldn't find tree for context id ${logEntry.source.context}`);
|
|
@@ -5315,14 +5318,20 @@ var ShadowRootManager = class {
|
|
|
5315
5318
|
if (!tree) {
|
|
5316
5319
|
return [];
|
|
5317
5320
|
}
|
|
5321
|
+
let documentElement;
|
|
5318
5322
|
if (scope) {
|
|
5319
5323
|
const subTree = tree.find(scope);
|
|
5320
5324
|
if (subTree) {
|
|
5321
5325
|
tree = subTree;
|
|
5322
5326
|
}
|
|
5327
|
+
} else {
|
|
5328
|
+
documentElement = this.#documentElement?.sharedId;
|
|
5323
5329
|
}
|
|
5324
5330
|
const elements = tree.getAllLookupScopes();
|
|
5325
|
-
return [
|
|
5331
|
+
return [
|
|
5332
|
+
...documentElement ? [documentElement] : [],
|
|
5333
|
+
...new Set(elements).values()
|
|
5334
|
+
];
|
|
5326
5335
|
}
|
|
5327
5336
|
getShadowElementPairsByContextId(contextId, scope) {
|
|
5328
5337
|
let tree = this.#shadowRoots.get(contextId);
|
|
@@ -8,7 +8,7 @@ function customElementWrapper() {
|
|
|
8
8
|
while (parentNode.parentNode) {
|
|
9
9
|
parentNode = parentNode.parentNode;
|
|
10
10
|
}
|
|
11
|
-
console.debug("[WDIO]", "newShadowRoot", this, parentNode, parentNode === document);
|
|
11
|
+
console.debug("[WDIO]", "newShadowRoot", this, parentNode, parentNode === document, document.documentElement);
|
|
12
12
|
return origConnectedCallback?.call(this);
|
|
13
13
|
};
|
|
14
14
|
const origDisconnectedCallback = Constructor.prototype.disconnectedCallback;
|
|
@@ -25,7 +25,7 @@ function customElementWrapper() {
|
|
|
25
25
|
while (parentNode.parentNode) {
|
|
26
26
|
parentNode = parentNode.parentNode;
|
|
27
27
|
}
|
|
28
|
-
console.debug("[WDIO]", "newShadowRoot", this, parentNode, parentNode === document);
|
|
28
|
+
console.debug("[WDIO]", "newShadowRoot", this, parentNode, parentNode === document, document.documentElement);
|
|
29
29
|
return shadowRoot;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadowRoot.d.ts","sourceRoot":"","sources":["../src/shadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AAStC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,qBAShE;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;;
|
|
1
|
+
{"version":3,"file":"shadowRoot.d.ts","sourceRoot":"","sources":["../src/shadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AAStC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,qBAShE;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;;gBAOd,OAAO,EAAE,WAAW,CAAC,OAAO;IAyBlC,UAAU;IA2BhB;;;OAGG;IACH,aAAa;IAIb;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ;IAgGvC,4BAA4B,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAkC1E,gCAAgC,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE;IAgBpG,qBAAqB,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IActF,gBAAgB,CAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAOvD;AAED,qBAAa,cAAc;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,QAAQ,sBAA4B;gBAEvB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc;IAMxE;;OAEG;IACH,gBAAgB,CAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAC7C;;;;;OAKG;IACH,gBAAgB,CAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IA6B5D,IAAI,CAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAelD,cAAc,CAAE,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAe/D,kBAAkB,IAAK,MAAM,EAAE;IAO/B,IAAI,IAAK,cAAc,EAAE;IAIzB,MAAM,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO;CAepC"}
|
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.2.
|
|
4
|
+
"version": "9.2.12",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"optional": true
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "5283e03d12615050ba8e1c54a9903e171068d143"
|
|
114
114
|
}
|