-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.20.1
Node.js Version
v20.11.1
Mode
Standalone Mode
Which capabilities are you using?
What happened?
After upgrading wdio from 9.20.0 to 9.20.1 we are seeing significant instability in our tests. It works fine again after downgrading to 9.20.0.
All occurrences are happening at places where we are using waitForDisplayed() on an xPath selector.
It seems like it fails when the element is not visible yet, even though it becomes visible after a few milliseconds and should still try to find it.
When it hangs up we can see endless spamming of always the same two BIDI commands like in this example until the timeout is reached:
[0-0] 2025-11-24T13:38:21.144Z INFO webdriver: BIDI COMMAND script.callFunction {"functionDeclaration":"<Function[279 bytes] checkVisibility>","awaitPromise":true,"arguments":[{"sharedId":"f.15A342E39E843C2E0CCB75A4438058FD.d.9D7B7792B1275AA998343C0072FA8B36.e.7596"},{"type":"object","value":[["withinViewport",{"type":"boolean","value":false}],["contentVisibilityAuto",{"type":"boolean","value":true}],["opacityProperty",{"type":"boolean","value":true}],["visibilityProperty",{"type":"boolean","value":true}]]}],"target":{"context":"15A342E39E843C2E0CCB75A4438058FD"}}
[0-0] 2025-11-24T13:38:21.144Z INFO webdriver: BIDI COMMAND script.callFunction {"functionDeclaration":"<Function[243 bytes] anonymous>","awaitPromise":true,"arguments":[{"sharedId":"f.15A342E39E843C2E0CCB75A4438058FD.d.9D7B7792B1275AA998343C0072FA8B36.e.7596"},{"type":"string","value":"display"}],"target":{"context":"15A342E39E843C2E0CCB75A4438058FD"}}
[0-0] 2025-11-24T13:38:21.163Z INFO webdriver: BIDI RESULT {"id":616,"result":{"realm":"602209040330016383.1499824675741711373","result":{"type":"boolean","value":false},"type":"success"},"type":"success"}
[0-0] 2025-11-24T13:38:21.164Z INFO webdriver: BIDI RESULT {"id":617,"result":{"realm":"602209040330016383.1499824675741711373","result":{"type":"string","value":""},"type":"success"},"type":"success"}
... repeated infinitely ...
The function declaration is:
"function anonymous(\n) {\nreturn (/* __wdio script__ */(elem2, cssProperty2) => {\n if (!elem2) {\n return \"\";\n }\n return window.getComputedStyle(elem2)[cssProperty2];\n }/* __wdio script end__ */).apply(this, arguments);\n}"
Eventually, we are getting the error after timeout like
Error: element ("//table//tbody//tr[1]") still not displayed after 240000m
which is not correct, as the element is clearly visible.
Looking at the change log, the most likely related issue would be #14853
What is your expected behavior?
No response
How to reproduce the bug.
Unfortunately I can not provide an example which fails reliably right now or where I could disclose the source code.
Relevant log output
see description aboveCode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues