webdriverio 9.20.0 → 9.20.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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
/**
|
|
3
|
+
* Wait until at least one matching request has received a response.
|
|
4
|
+
*
|
|
5
|
+
* <example>
|
|
6
|
+
:waitForResponse.js
|
|
7
|
+
it('should wait for a matching response', async () => {
|
|
8
|
+
const mock = await browser.mock('**' + '/users/list')
|
|
9
|
+
|
|
10
|
+
// trigger action that issues the request
|
|
11
|
+
await $('#load').click()
|
|
12
|
+
|
|
13
|
+
await mock.waitForResponse({ timeout: 5000 })
|
|
14
|
+
expect(mock.calls.length).toBeGreaterThan(0)
|
|
15
|
+
})
|
|
16
|
+
* </example>
|
|
17
|
+
*
|
|
18
|
+
* @alias mock.waitForResponse
|
|
19
|
+
* @param {WaitForOptions=} options wait options
|
|
20
|
+
* @param {Number=} options.timeout max wait time in ms (defaults to `browser.options.waitforTimeout`)
|
|
21
|
+
* @param {Number=} options.interval poll interval in ms (defaults to `browser.options.waitforInterval`)
|
|
22
|
+
* @param {String=} options.timeoutMsg custom timeout error message
|
|
23
|
+
*/
|
|
24
|
+
//# sourceMappingURL=waitForResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForResponse.d.ts","sourceRoot":"","sources":["../../../src/commands/mock/waitForResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
package/build/index.js
CHANGED
|
@@ -3405,7 +3405,7 @@ async function execute(script, ...args) {
|
|
|
3405
3405
|
return parseScriptResult(params, result);
|
|
3406
3406
|
}
|
|
3407
3407
|
if (typeof script === "function") {
|
|
3408
|
-
script = "\n ".concat(polyfillFn, "\n webdriverioPolyfill()
|
|
3408
|
+
script = "\n ".concat(polyfillFn, "\n webdriverioPolyfill();\n return (").concat(script, ").apply(null, arguments)\n ");
|
|
3409
3409
|
}
|
|
3410
3410
|
return this.executeScript(script, verifyArgsAndStripIfElement(args));
|
|
3411
3411
|
}
|
|
@@ -6587,7 +6587,7 @@ async function getShorthandPropertyCSSValue(options) {
|
|
|
6587
6587
|
return mergeEqualSymmetricalValue(cssValues2);
|
|
6588
6588
|
}
|
|
6589
6589
|
const cssValues = await Promise.all(
|
|
6590
|
-
properties.map((prop) =>
|
|
6590
|
+
properties.map((prop) => getComputedStyleProperty(this, prop))
|
|
6591
6591
|
);
|
|
6592
6592
|
return mergeEqualSymmetricalValue(cssValues);
|
|
6593
6593
|
}
|
|
@@ -6602,7 +6602,7 @@ async function getPropertyCSSValue(options) {
|
|
|
6602
6602
|
}
|
|
6603
6603
|
);
|
|
6604
6604
|
}
|
|
6605
|
-
return await
|
|
6605
|
+
return await getComputedStyleProperty(this, cssProperty);
|
|
6606
6606
|
}
|
|
6607
6607
|
function getShorthandProperties(cssProperty) {
|
|
6608
6608
|
return cssShorthandProps.expand(cssProperty);
|
|
@@ -6633,6 +6633,20 @@ async function getPseudoElementCSSValue(elem, options) {
|
|
|
6633
6633
|
);
|
|
6634
6634
|
return cssValue2;
|
|
6635
6635
|
}
|
|
6636
|
+
async function getComputedStyleProperty(elem, cssProperty) {
|
|
6637
|
+
const browser = getBrowserObject19(elem);
|
|
6638
|
+
const cssValue2 = await browser.execute(
|
|
6639
|
+
(elem2, cssProperty2) => {
|
|
6640
|
+
if (!elem2) {
|
|
6641
|
+
return "";
|
|
6642
|
+
}
|
|
6643
|
+
return window.getComputedStyle(elem2)[cssProperty2];
|
|
6644
|
+
},
|
|
6645
|
+
elem,
|
|
6646
|
+
cssProperty
|
|
6647
|
+
);
|
|
6648
|
+
return cssValue2;
|
|
6649
|
+
}
|
|
6636
6650
|
|
|
6637
6651
|
// src/commands/element/getComputedRole.ts
|
|
6638
6652
|
function getComputedRole() {
|
package/build/node.js
CHANGED
|
@@ -3584,7 +3584,7 @@ async function execute(script, ...args) {
|
|
|
3584
3584
|
if (typeof script === "function") {
|
|
3585
3585
|
script = `
|
|
3586
3586
|
${polyfillFn}
|
|
3587
|
-
webdriverioPolyfill()
|
|
3587
|
+
webdriverioPolyfill();
|
|
3588
3588
|
return (${script}).apply(null, arguments)
|
|
3589
3589
|
`;
|
|
3590
3590
|
}
|
|
@@ -6630,7 +6630,7 @@ async function getShorthandPropertyCSSValue(options) {
|
|
|
6630
6630
|
return mergeEqualSymmetricalValue(cssValues2);
|
|
6631
6631
|
}
|
|
6632
6632
|
const cssValues = await Promise.all(
|
|
6633
|
-
properties.map((prop) =>
|
|
6633
|
+
properties.map((prop) => getComputedStyleProperty(this, prop))
|
|
6634
6634
|
);
|
|
6635
6635
|
return mergeEqualSymmetricalValue(cssValues);
|
|
6636
6636
|
}
|
|
@@ -6645,7 +6645,7 @@ async function getPropertyCSSValue(options) {
|
|
|
6645
6645
|
}
|
|
6646
6646
|
);
|
|
6647
6647
|
}
|
|
6648
|
-
return await
|
|
6648
|
+
return await getComputedStyleProperty(this, cssProperty);
|
|
6649
6649
|
}
|
|
6650
6650
|
function getShorthandProperties(cssProperty) {
|
|
6651
6651
|
return cssShorthandProps.expand(cssProperty);
|
|
@@ -6676,6 +6676,20 @@ async function getPseudoElementCSSValue(elem, options) {
|
|
|
6676
6676
|
);
|
|
6677
6677
|
return cssValue2;
|
|
6678
6678
|
}
|
|
6679
|
+
async function getComputedStyleProperty(elem, cssProperty) {
|
|
6680
|
+
const browser = getBrowserObject20(elem);
|
|
6681
|
+
const cssValue2 = await browser.execute(
|
|
6682
|
+
(elem2, cssProperty2) => {
|
|
6683
|
+
if (!elem2) {
|
|
6684
|
+
return "";
|
|
6685
|
+
}
|
|
6686
|
+
return window.getComputedStyle(elem2)[cssProperty2];
|
|
6687
|
+
},
|
|
6688
|
+
elem,
|
|
6689
|
+
cssProperty
|
|
6690
|
+
);
|
|
6691
|
+
return cssValue2;
|
|
6692
|
+
}
|
|
6679
6693
|
|
|
6680
6694
|
// src/commands/element/getComputedRole.ts
|
|
6681
6695
|
function getComputedRole() {
|
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.20.
|
|
4
|
+
"version": "9.20.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.20.
|
|
80
|
+
"@wdio/config": "9.20.1",
|
|
81
81
|
"@wdio/logger": "9.18.0",
|
|
82
82
|
"@wdio/protocols": "9.16.2",
|
|
83
83
|
"@wdio/repl": "9.16.2",
|
|
84
84
|
"@wdio/types": "9.20.0",
|
|
85
|
-
"@wdio/utils": "9.20.
|
|
85
|
+
"@wdio/utils": "9.20.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.20.
|
|
102
|
+
"webdriver": "9.20.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": "ac132d5e6c95ad0b9f4e92cb0090c9a60296da4c"
|
|
113
113
|
}
|