selenium
selenium copied to clipboard
[bot] Determine more reliably if node has shadow DOM
Description
node.shadowRoot might have an object assigned (some framework working with ShadyDOM does assign an object to node.shadowRoot), but it is no necessarily used by the browser as it must be constructed by ShadowRoot, otherwise is ignored.
Motivation and Context
Mechanisms like bot.dom.isShown() would determine an element is not shown because it believes it does not have parent.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] I have read the contributing document.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
So there are libraries using the shadow property to store an object only to be reified as a proper shadow object later? that's interesting.