webdriverio 8.24.3 → 8.24.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isElementDisplayed.d.ts","sourceRoot":"","sources":["../../src/scripts/isElementDisplayed.ts"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,OAAO,EAAE,OAAO,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"isElementDisplayed.d.ts","sourceRoot":"","sources":["../../src/scripts/isElementDisplayed.ts"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CA+OrE"}
|
|
@@ -89,12 +89,16 @@ export default function isElementDisplayed(element) {
|
|
|
89
89
|
const parentElement = parentElementForElement(element);
|
|
90
90
|
return cascadedStylePropertyForElement(parentElement, property);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function elementHasBoundingBox(element) {
|
|
93
93
|
const boundingBox = element.getBoundingClientRect();
|
|
94
|
-
|
|
94
|
+
return boundingBox.width > 0 && boundingBox.height > 0;
|
|
95
|
+
}
|
|
96
|
+
function elementSubtreeHasNonZeroDimensions(element) {
|
|
97
|
+
if (elementHasBoundingBox(element)) {
|
|
95
98
|
return true;
|
|
96
99
|
}
|
|
97
100
|
// Paths can have a zero width or height. Treat them as shown if the stroke width is positive.
|
|
101
|
+
const boundingBox = element.getBoundingClientRect();
|
|
98
102
|
if (element.tagName.toUpperCase() === 'PATH' && boundingBox.width + boundingBox.height > 0) {
|
|
99
103
|
const strokeWidth = cascadedStylePropertyForElement(element, 'stroke-width');
|
|
100
104
|
return !!strokeWidth && (parseInt(strokeWidth, 10) > 0);
|
|
@@ -210,7 +214,7 @@ export default function isElementDisplayed(element) {
|
|
|
210
214
|
if (!elementSubtreeHasNonZeroDimensions(element)) {
|
|
211
215
|
return false;
|
|
212
216
|
}
|
|
213
|
-
if (isElementSubtreeHiddenByOverflow(element)) {
|
|
217
|
+
if (isElementSubtreeHiddenByOverflow(element) && !elementHasBoundingBox(element)) {
|
|
214
218
|
return false;
|
|
215
219
|
}
|
|
216
220
|
return true;
|
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": "8.24.
|
|
4
|
+
"version": "8.24.5",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@types/node": "^20.1.0",
|
|
71
|
-
"@wdio/config": "8.24.
|
|
71
|
+
"@wdio/config": "8.24.5",
|
|
72
72
|
"@wdio/logger": "8.16.17",
|
|
73
73
|
"@wdio/protocols": "8.23.0",
|
|
74
74
|
"@wdio/repl": "8.23.1",
|
|
75
75
|
"@wdio/types": "8.24.2",
|
|
76
|
-
"@wdio/utils": "8.24.
|
|
76
|
+
"@wdio/utils": "8.24.5",
|
|
77
77
|
"archiver": "^6.0.0",
|
|
78
78
|
"aria-query": "^5.0.0",
|
|
79
79
|
"css-shorthand-properties": "^1.1.1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"resq": "^1.9.1",
|
|
91
91
|
"rgb2hex": "0.2.5",
|
|
92
92
|
"serialize-error": "^11.0.1",
|
|
93
|
-
"webdriver": "8.24.
|
|
93
|
+
"webdriver": "8.24.5"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"devtools": "^8.14.0"
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"optional": true
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "3272ade1b378dd0756d2c3b789198a692f5a706d"
|
|
104
104
|
}
|