webdriverio 9.12.1 → 9.12.2
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/mobile/deepLink.d.ts +2 -2
- package/build/index.js +10 -4
- package/build/node.js +10 -4
- package/build/utils/index.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// open the Drag tab with a deep link (this the bundleId for the iOS Demo App)
|
|
9
9
|
await browser.deepLink('wdio://drag', 'org.reactjs.native.example.wdiodemoapp');
|
|
10
10
|
|
|
11
|
-
// Or open the Drag tab with a deep link (this the
|
|
11
|
+
// Or open the Drag tab with a deep link (this the package name for the Android Demo App)
|
|
12
12
|
await browser.deepLink('wdio://drag', 'com.wdiodemoapp');
|
|
13
13
|
|
|
14
14
|
// Or if you want to have it "cross-platform" you can use it like this
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* </example>
|
|
18
18
|
*
|
|
19
19
|
* @param {string} link The deep link URL that should be opened in the mobile app. It should be a valid deep link URL (e.g. `myapp://path`). If it's a universal deep link, which can be used for iOS, use the `browser.url("your-url")`-method.
|
|
20
|
-
* @param {string} appIdentifier The value of the `
|
|
20
|
+
* @param {string} appIdentifier The value of the `package` (Android) or `bundleId` (iOS) of the app that the deep link should open.
|
|
21
21
|
*/
|
|
22
22
|
export declare function deepLink(this: WebdriverIO.Browser, link: string, appIdentifier: string): Promise<unknown>;
|
|
23
23
|
//# sourceMappingURL=deepLink.d.ts.map
|
package/build/index.js
CHANGED
|
@@ -6157,12 +6157,12 @@ async function deepLink(link, appIdentifier) {
|
|
|
6157
6157
|
}
|
|
6158
6158
|
if (!appIdentifier) {
|
|
6159
6159
|
const mobileOS = browser2.isIOS ? "iOS" : "Android";
|
|
6160
|
-
const identifierValue = browser2.isIOS ? "bundleId" : "
|
|
6160
|
+
const identifierValue = browser2.isIOS ? "bundleId" : "package";
|
|
6161
6161
|
throw new Error("When using a deep link URL for ".concat(mobileOS, ", you need to provide the `").concat(identifierValue, "` of the app that the deep link should open."));
|
|
6162
6162
|
}
|
|
6163
6163
|
return browser2.execute("mobile:deepLink", {
|
|
6164
6164
|
url: link,
|
|
6165
|
-
[browser2.isIOS ? "bundleId" : "
|
|
6165
|
+
[browser2.isIOS ? "bundleId" : "package"]: appIdentifier
|
|
6166
6166
|
});
|
|
6167
6167
|
}
|
|
6168
6168
|
function isDeepLinkUrl(link) {
|
|
@@ -8374,10 +8374,11 @@ async function findDeepElement(selector) {
|
|
|
8374
8374
|
const locator = transformClassicToBidiSelector(using, value);
|
|
8375
8375
|
const startNodes = shadowRoots.length > 0 ? shadowRoots.map((shadowRootNodeId) => ({ sharedId: shadowRootNodeId })) : this.elementId ? [{ sharedId: this.elementId }] : void 0;
|
|
8376
8376
|
const deepElementResult = await browser2.browsingContextLocateNodes({ locator, context, startNodes }).then(async (result) => {
|
|
8377
|
-
|
|
8377
|
+
let nodes = result.nodes.filter((node) => Boolean(node.sharedId)).map((node) => ({
|
|
8378
8378
|
[ELEMENT_KEY20]: node.sharedId,
|
|
8379
8379
|
locator
|
|
8380
8380
|
}));
|
|
8381
|
+
nodes = returnUniqueNodes(nodes);
|
|
8381
8382
|
if (!this.elementId) {
|
|
8382
8383
|
return nodes[0];
|
|
8383
8384
|
}
|
|
@@ -8412,10 +8413,11 @@ async function findDeepElements(selector) {
|
|
|
8412
8413
|
const locator = transformClassicToBidiSelector(using, value);
|
|
8413
8414
|
const startNodes = shadowRoots.length > 0 ? shadowRoots.map((shadowRootNodeId) => ({ sharedId: shadowRootNodeId })) : this.elementId ? [{ sharedId: this.elementId }] : void 0;
|
|
8414
8415
|
const deepElementResult = await browser2.browsingContextLocateNodes({ locator, context, startNodes }).then(async (result) => {
|
|
8415
|
-
|
|
8416
|
+
let nodes = result.nodes.filter((node) => Boolean(node.sharedId)).map((node) => ({
|
|
8416
8417
|
[ELEMENT_KEY20]: node.sharedId,
|
|
8417
8418
|
locator
|
|
8418
8419
|
}));
|
|
8420
|
+
nodes = returnUniqueNodes(nodes);
|
|
8419
8421
|
if (!this.elementId) {
|
|
8420
8422
|
return nodes;
|
|
8421
8423
|
}
|
|
@@ -8434,6 +8436,10 @@ async function findDeepElements(selector) {
|
|
|
8434
8436
|
});
|
|
8435
8437
|
return deepElementResult;
|
|
8436
8438
|
}
|
|
8439
|
+
function returnUniqueNodes(nodes) {
|
|
8440
|
+
const ids = /* @__PURE__ */ new Set();
|
|
8441
|
+
return nodes.filter((node) => !ids.has(node[ELEMENT_KEY20]) && ids.add(node[ELEMENT_KEY20]));
|
|
8442
|
+
}
|
|
8437
8443
|
async function findElement(selector) {
|
|
8438
8444
|
const browserObject = getBrowserObject35(this);
|
|
8439
8445
|
const shadowRootManager = getShadowRootManager(browserObject);
|
package/build/node.js
CHANGED
|
@@ -6231,12 +6231,12 @@ async function deepLink(link, appIdentifier) {
|
|
|
6231
6231
|
}
|
|
6232
6232
|
if (!appIdentifier) {
|
|
6233
6233
|
const mobileOS = browser2.isIOS ? "iOS" : "Android";
|
|
6234
|
-
const identifierValue = browser2.isIOS ? "bundleId" : "
|
|
6234
|
+
const identifierValue = browser2.isIOS ? "bundleId" : "package";
|
|
6235
6235
|
throw new Error(`When using a deep link URL for ${mobileOS}, you need to provide the \`${identifierValue}\` of the app that the deep link should open.`);
|
|
6236
6236
|
}
|
|
6237
6237
|
return browser2.execute("mobile:deepLink", {
|
|
6238
6238
|
url: link,
|
|
6239
|
-
[browser2.isIOS ? "bundleId" : "
|
|
6239
|
+
[browser2.isIOS ? "bundleId" : "package"]: appIdentifier
|
|
6240
6240
|
});
|
|
6241
6241
|
}
|
|
6242
6242
|
function isDeepLinkUrl(link) {
|
|
@@ -8090,10 +8090,11 @@ async function findDeepElement(selector) {
|
|
|
8090
8090
|
const locator = transformClassicToBidiSelector(using, value);
|
|
8091
8091
|
const startNodes = shadowRoots.length > 0 ? shadowRoots.map((shadowRootNodeId) => ({ sharedId: shadowRootNodeId })) : this.elementId ? [{ sharedId: this.elementId }] : void 0;
|
|
8092
8092
|
const deepElementResult = await browser2.browsingContextLocateNodes({ locator, context, startNodes }).then(async (result) => {
|
|
8093
|
-
|
|
8093
|
+
let nodes = result.nodes.filter((node) => Boolean(node.sharedId)).map((node) => ({
|
|
8094
8094
|
[ELEMENT_KEY20]: node.sharedId,
|
|
8095
8095
|
locator
|
|
8096
8096
|
}));
|
|
8097
|
+
nodes = returnUniqueNodes(nodes);
|
|
8097
8098
|
if (!this.elementId) {
|
|
8098
8099
|
return nodes[0];
|
|
8099
8100
|
}
|
|
@@ -8128,10 +8129,11 @@ async function findDeepElements(selector) {
|
|
|
8128
8129
|
const locator = transformClassicToBidiSelector(using, value);
|
|
8129
8130
|
const startNodes = shadowRoots.length > 0 ? shadowRoots.map((shadowRootNodeId) => ({ sharedId: shadowRootNodeId })) : this.elementId ? [{ sharedId: this.elementId }] : void 0;
|
|
8130
8131
|
const deepElementResult = await browser2.browsingContextLocateNodes({ locator, context, startNodes }).then(async (result) => {
|
|
8131
|
-
|
|
8132
|
+
let nodes = result.nodes.filter((node) => Boolean(node.sharedId)).map((node) => ({
|
|
8132
8133
|
[ELEMENT_KEY20]: node.sharedId,
|
|
8133
8134
|
locator
|
|
8134
8135
|
}));
|
|
8136
|
+
nodes = returnUniqueNodes(nodes);
|
|
8135
8137
|
if (!this.elementId) {
|
|
8136
8138
|
return nodes;
|
|
8137
8139
|
}
|
|
@@ -8150,6 +8152,10 @@ async function findDeepElements(selector) {
|
|
|
8150
8152
|
});
|
|
8151
8153
|
return deepElementResult;
|
|
8152
8154
|
}
|
|
8155
|
+
function returnUniqueNodes(nodes) {
|
|
8156
|
+
const ids = /* @__PURE__ */ new Set();
|
|
8157
|
+
return nodes.filter((node) => !ids.has(node[ELEMENT_KEY20]) && ids.add(node[ELEMENT_KEY20]));
|
|
8158
|
+
}
|
|
8153
8159
|
async function findElement(selector) {
|
|
8154
8160
|
const browserObject = getBrowserObject36(this);
|
|
8155
8161
|
const shadowRootManager = getShadow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,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,OAAO,EAAE,6BAwCnB,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;AAED,wBAAgB,mCAAmC,CAAE,UAAU,EAAE,QAAQ,GAAG,MAAM,UAKjF"}
|
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.12.
|
|
4
|
+
"version": "9.12.2",
|
|
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.12.
|
|
80
|
+
"@wdio/config": "9.12.2",
|
|
81
81
|
"@wdio/logger": "9.4.4",
|
|
82
|
-
"@wdio/protocols": "9.
|
|
82
|
+
"@wdio/protocols": "9.12.2",
|
|
83
83
|
"@wdio/repl": "9.4.4",
|
|
84
|
-
"@wdio/types": "9.
|
|
85
|
-
"@wdio/utils": "9.12.
|
|
84
|
+
"@wdio/types": "9.12.2",
|
|
85
|
+
"@wdio/utils": "9.12.2",
|
|
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": "^11.0.3",
|
|
101
101
|
"urlpattern-polyfill": "^10.0.0",
|
|
102
|
-
"webdriver": "9.12.
|
|
102
|
+
"webdriver": "9.12.2"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"puppeteer-core": "^22.3.0"
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"optional": true
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "dc30cc8863706e3522c78ebb75b0c4a44746aa5b"
|
|
113
113
|
}
|