@wdio/utils 9.19.1 → 9.20.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/index.js +13 -9
- package/build/monad.d.ts +1 -1
- package/build/monad.d.ts.map +1 -1
- package/package.json +3 -3
package/build/index.js
CHANGED
|
@@ -379,7 +379,7 @@ function WebDriver(options, modifier, propertiesObject = {}) {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
function unit(sessionId, commandWrapper) {
|
|
382
|
+
function unit(sessionId, commandWrapper, elementCmdImplicitWaitExclusionList) {
|
|
383
383
|
propertiesObject.commandList = { value: Object.keys(propertiesObject) };
|
|
384
384
|
propertiesObject.options = { value: options };
|
|
385
385
|
if ("requestedCapabilities" in options) {
|
|
@@ -405,11 +405,15 @@ function WebDriver(options, modifier, propertiesObject = {}) {
|
|
|
405
405
|
if (typeof modifier === "function") {
|
|
406
406
|
client = modifier(client, options);
|
|
407
407
|
}
|
|
408
|
-
client.addCommand = function(name, func,
|
|
408
|
+
client.addCommand = function(name, func, attachToElementOrOptions = false, proto, instances) {
|
|
409
|
+
const { attachToElement, disableElementImplicitWait, proto: _proto, instances: _instances } = typeof attachToElementOrOptions === "object" && attachToElementOrOptions !== null ? attachToElementOrOptions : { attachToElement: attachToElementOrOptions, proto, instances };
|
|
409
410
|
const customCommand = typeof commandWrapper === "function" ? commandWrapper(name, func) : func;
|
|
410
411
|
if (attachToElement) {
|
|
411
|
-
if (
|
|
412
|
-
|
|
412
|
+
if (disableElementImplicitWait && elementCmdImplicitWaitExclusionList && !elementCmdImplicitWaitExclusionList.includes(name)) {
|
|
413
|
+
elementCmdImplicitWaitExclusionList.push(name);
|
|
414
|
+
}
|
|
415
|
+
if (_instances) {
|
|
416
|
+
Object.values(_instances).forEach((instance) => {
|
|
413
417
|
instance.__propertiesObject__[name] = {
|
|
414
418
|
value: customCommand
|
|
415
419
|
};
|
|
@@ -417,7 +421,7 @@ function WebDriver(options, modifier, propertiesObject = {}) {
|
|
|
417
421
|
}
|
|
418
422
|
this.__propertiesObject__[name] = { value: customCommand };
|
|
419
423
|
} else {
|
|
420
|
-
unit.lift(name, customCommand,
|
|
424
|
+
unit.lift(name, customCommand, _proto);
|
|
421
425
|
}
|
|
422
426
|
if (typeof process.send === "function" && process.env.WDIO_WORKER_ID) {
|
|
423
427
|
const message = {
|
|
@@ -1047,12 +1051,12 @@ function wrapCommand(commandName, fn) {
|
|
|
1047
1051
|
});
|
|
1048
1052
|
}
|
|
1049
1053
|
if (commandName.endsWith("$$") && typeof pIteration_exports[prop] === "function") {
|
|
1050
|
-
return (
|
|
1054
|
+
return (...iteratorArgs) => wrapElementFn(
|
|
1051
1055
|
target,
|
|
1052
|
-
function(
|
|
1053
|
-
return pIteration_exports[prop](this,
|
|
1056
|
+
function(...iteratorArgs2) {
|
|
1057
|
+
return pIteration_exports[prop](this, ...iteratorArgs2);
|
|
1054
1058
|
},
|
|
1055
|
-
|
|
1059
|
+
iteratorArgs
|
|
1056
1060
|
);
|
|
1057
1061
|
}
|
|
1058
1062
|
if (ELEMENT_PROPS.includes(prop)) {
|
package/build/monad.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ interface PropertiesObject {
|
|
|
2
2
|
[key: string | symbol]: PropertyDescriptor;
|
|
3
3
|
}
|
|
4
4
|
export default function WebDriver(options: object, modifier?: Function, propertiesObject?: PropertiesObject): {
|
|
5
|
-
(this: void, sessionId: string, commandWrapper?: Function): any;
|
|
5
|
+
(this: void, sessionId: string, commandWrapper?: Function, elementCmdImplicitWaitExclusionList?: string[]): any;
|
|
6
6
|
lift(name: string, func: Function, proto: Record<string, any>, origCommand?: Function): void;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
package/build/monad.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAiBA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAwCvF,IAAI,aAAa,MAAM,mBAAmB,QAAQ;
|
|
1
|
+
{"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAiBA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAwCvF,IAAI,aAAa,MAAM,mBAAmB,QAAQ,wCAAwC,MAAM,EAAE;eA6J1F,MAAM,QAAQ,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EA8FzG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.20.0",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@puppeteer/browsers": "^2.2.0",
|
|
41
41
|
"@wdio/logger": "9.18.0",
|
|
42
|
-
"@wdio/types": "9.
|
|
42
|
+
"@wdio/types": "9.20.0",
|
|
43
43
|
"decamelize": "^6.0.0",
|
|
44
44
|
"deepmerge-ts": "^7.0.3",
|
|
45
45
|
"edgedriver": "^6.1.2",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6c8694a72b8e173ecdd20dacae5d49d089b2877c"
|
|
59
59
|
}
|