webdriverio 9.0.8 → 9.1.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/commands/browser/deleteCookies.d.ts +1 -1
- package/build/index.js +7 -6
- package/build/scripts/customElement.js +2 -2
- package/build/scripts/isElementDisplayed.js +2 -0
- package/build/utils/detectBackend.d.ts +0 -1
- package/build/utils/detectBackend.d.ts.map +1 -1
- package/build/utils/index.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -4,7 +4,7 @@ import type { remote } from 'webdriver';
|
|
|
4
4
|
* just removes the single cookie or more when multiple names are passed.
|
|
5
5
|
*
|
|
6
6
|
* @alias browser.deleteCookies
|
|
7
|
-
* @param {
|
|
7
|
+
* @param {StorageCookieFilter[]} filter Use the filter property to identify and delete specific cookies based on matching criteria.
|
|
8
8
|
* @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L9-L29
|
|
9
9
|
* @example https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/deleteCookies/example.js#L31-L35
|
|
10
10
|
*/
|
package/build/index.js
CHANGED
|
@@ -5733,6 +5733,7 @@ var findStrategy = function(selector, isW3C, isMobile) {
|
|
|
5733
5733
|
let using = DEFAULT_STRATEGY;
|
|
5734
5734
|
let value = selector;
|
|
5735
5735
|
switch (defineStrategy(selector)) {
|
|
5736
|
+
// user has specified locator strategy directly
|
|
5736
5737
|
case "directly": {
|
|
5737
5738
|
const match = stringSelector.match(DIRECT_SELECTOR_REGEXP);
|
|
5738
5739
|
if (!match) {
|
|
@@ -6384,7 +6385,8 @@ function isStaleElementError(err) {
|
|
|
6384
6385
|
err.message.includes("stale element reference") || // Firefox
|
|
6385
6386
|
err.message.includes("is no longer attached to the DOM") || // Safari
|
|
6386
6387
|
err.message.toLowerCase().includes("stale element found") || // Chrome through JS execution
|
|
6387
|
-
err.message.includes("stale element not found in the current frame")
|
|
6388
|
+
err.message.includes("stale element not found in the current frame") || // BIDI
|
|
6389
|
+
err.message.includes("belongs to different document")
|
|
6388
6390
|
);
|
|
6389
6391
|
}
|
|
6390
6392
|
function transformClassicToBidiSelector(using, value) {
|
|
@@ -6484,7 +6486,7 @@ async function findElement(selector) {
|
|
|
6484
6486
|
if (typeof selector === "string" && selector.startsWith(DEEP_SELECTOR)) {
|
|
6485
6487
|
const notFoundError = new Error(`shadow selector "${selector.slice(DEEP_SELECTOR.length)}" did not return an HTMLElement`);
|
|
6486
6488
|
let elem = await browserObject.execute(
|
|
6487
|
-
|
|
6489
|
+
querySelectorAllDeep,
|
|
6488
6490
|
false,
|
|
6489
6491
|
selector.slice(DEEP_SELECTOR.length),
|
|
6490
6492
|
// hard conversion from element id to Element is done by browser driver
|
|
@@ -6533,7 +6535,7 @@ async function findElements(selector) {
|
|
|
6533
6535
|
const browserObject = getBrowserObject30(this);
|
|
6534
6536
|
if (typeof selector === "string" && selector.startsWith(DEEP_SELECTOR)) {
|
|
6535
6537
|
const elems = await browserObject.execute(
|
|
6536
|
-
|
|
6538
|
+
querySelectorAllDeep,
|
|
6537
6539
|
true,
|
|
6538
6540
|
selector.slice(DEEP_SELECTOR.length),
|
|
6539
6541
|
// hard conversion from element id to Element is done by browser driver
|
|
@@ -6892,7 +6894,6 @@ var REGION_MAPPING = {
|
|
|
6892
6894
|
// default endpoint
|
|
6893
6895
|
"eu": "eu-central-1.",
|
|
6894
6896
|
"eu-central-1": "eu-central-1.",
|
|
6895
|
-
"us-east-1": "us-east-1.",
|
|
6896
6897
|
"us-east-4": "us-east-4.",
|
|
6897
6898
|
"apac": "apac-southeast-1.",
|
|
6898
6899
|
"apac-southeast-1": "apac-southeast-1"
|
|
@@ -6907,7 +6908,7 @@ function getSauceEndpoint(region, { isRDC, isVisual } = {}) {
|
|
|
6907
6908
|
return `ondemand.${REGION_MAPPING[shortRegion]}saucelabs.com`;
|
|
6908
6909
|
}
|
|
6909
6910
|
function detectBackend(options = {}) {
|
|
6910
|
-
const { port, hostname, user, key, protocol, region,
|
|
6911
|
+
const { port, hostname, user, key, protocol, region, path: path4, capabilities } = options;
|
|
6911
6912
|
if (typeof user === "string" && typeof key === "string" && key.length === 20) {
|
|
6912
6913
|
return {
|
|
6913
6914
|
protocol: protocol || "https",
|
|
@@ -6927,7 +6928,7 @@ function detectBackend(options = {}) {
|
|
|
6927
6928
|
const isVisual = Boolean(!Array.isArray(capabilities) && capabilities && capabilities["sauce:visual"]?.apiKey);
|
|
6928
6929
|
if (typeof user === "string" && typeof key === "string" && key.length === 36 || // Or only RDC or visual
|
|
6929
6930
|
isVisual) {
|
|
6930
|
-
const sauceRegion =
|
|
6931
|
+
const sauceRegion = region;
|
|
6931
6932
|
return {
|
|
6932
6933
|
protocol: protocol || "https",
|
|
6933
6934
|
hostname: hostname || getSauceEndpoint(sauceRegion, { isVisual }),
|
|
@@ -9,12 +9,12 @@ function customElementWrapper() {
|
|
|
9
9
|
parentNode = parentNode.parentNode;
|
|
10
10
|
}
|
|
11
11
|
console.debug("[WDIO]", "newShadowRoot", this, parentNode, parentNode === document);
|
|
12
|
-
return origConnectedCallback
|
|
12
|
+
return origConnectedCallback?.call(this);
|
|
13
13
|
};
|
|
14
14
|
const origDisconnectedCallback = Constructor.prototype.disconnectedCallback;
|
|
15
15
|
Constructor.prototype.disconnectedCallback = function() {
|
|
16
16
|
console.debug("[WDIO]", "removeShadowRoot", this);
|
|
17
|
-
return origDisconnectedCallback
|
|
17
|
+
return origDisconnectedCallback?.call(this);
|
|
18
18
|
};
|
|
19
19
|
return origFn(name, Constructor, options);
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectBackend.d.ts","sourceRoot":"","sources":["../../src/utils/detectBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"detectBackend.d.ts","sourceRoot":"","sources":["../../src/utils/detectBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAiBxD,UAAU,qBAAqB;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAA;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,YAAY,CAAC,+BAA+B,CAAA;CAC9D;AAgBD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,GAAE,qBAA0B;;;;;EAkGxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,WAAW,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAQvD,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE/E,OAAO,KAAK,EAAmB,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtG,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAiBD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,uCAexD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,SAAU,gBAAgB,kBAuB5D,CAAA;AAWD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,gBAAgB,EAAE,MAAM,E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oB/D;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB,UACnF,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,wBAAwB,UAOjG;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,aACnB,WAAW,CAAC,OAAO,EAAE,UACvB,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,YACvC,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,8BAExD,GAAG,EAAE,6BAwCf,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,wBAAyB,MAAM,+CAAgD,CAAA;AAElG;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAShC,CAAA"}
|
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.0
|
|
4
|
+
"version": "9.1.0",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@types/node": "^20.11.30",
|
|
78
78
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
79
|
-
"@wdio/config": "9.0
|
|
80
|
-
"@wdio/logger": "9.0
|
|
79
|
+
"@wdio/config": "9.1.0",
|
|
80
|
+
"@wdio/logger": "9.1.0",
|
|
81
81
|
"@wdio/protocols": "9.0.8",
|
|
82
82
|
"@wdio/repl": "9.0.8",
|
|
83
|
-
"@wdio/types": "9.0
|
|
84
|
-
"@wdio/utils": "9.0
|
|
83
|
+
"@wdio/types": "9.1.0",
|
|
84
|
+
"@wdio/utils": "9.1.0",
|
|
85
85
|
"archiver": "^7.0.1",
|
|
86
86
|
"aria-query": "^5.3.0",
|
|
87
87
|
"cheerio": "^1.0.0-rc.12",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"rgb2hex": "0.2.5",
|
|
101
101
|
"serialize-error": "^11.0.3",
|
|
102
102
|
"urlpattern-polyfill": "^10.0.0",
|
|
103
|
-
"webdriver": "9.0
|
|
103
|
+
"webdriver": "9.1.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"puppeteer-core": "^22.3.0"
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"optional": true
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "e6b005f5a150c335a105cfc2e386d43ac526adac"
|
|
114
114
|
}
|