I migrated a large test suite from WebdriverIO v8 → v9 and ran into multiple regressions that make v9 unusable for our shadow-DOM-heavy application.
Key issues:
- Shadow DOM selectors frequently fail
Errors like:
WebDriverError: Failed to execute 'evaluate' on 'XPathExpression':
The node provided is '#document-fragment'
Dropdowns inside shadow roots fail to open ~55% of the time.
- Element scoping broken
In v8:
JavaScriptcard.$('.button') // correct scoping``Show more lines
In v9, the same code returns elements from all matching containers.
This causes wrong-click issues when multiple cards exist.
- Element staleness
In v9, elements become stale after any state update, requiring:
- frequent re-fetching
- retry loops
- multiple pauses
This adds complexity and slows tests down.
- Performance regression
Tests become 30–40% slower
Some interactions now take 3–4 seconds vs. 200–300ms in v8
Workarounds add 20+ lines per test section
Question:
Are these known issues with v9's BiDi implementation?
Is shadow DOM currently expected to be unstable in v9?
Is the recommended approach to stay on v8 for shadow-DOM-heavy applications until v9 matures?
Any guidance from WDIO team or other teams who migrated would help.