-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs decisionTLC needs to discuss and agreeTLC needs to discuss and agreeI-enhancementSomething could be betterSomething could be better
Description
I've been gradually trying to push support of shadow DOM v1 into selenium (see #4230, #5762).
However, we are still missing one major piece: traversal.
There needs to be some ability to traverse shadow DOM when calling FindElement
and what not.
So maybe we can discuss some possible implementations here?
What we can't/shouldn't do:
- Alter how existing selectors work (CSS, XPath, etc. they should all behave as they do now)
- Implement deprecated things like
/deep/
- Implement our own selector syntax/mechanism
The way I see this working is that we should treat the DOM as we would in the browser, meaning there will not be a way to select a deep element in one call:
element
.FindElement(By.CssSelector("foo"))
.ShadowRoot?
.FindElement(By.CssSelector("bar"));
Which, in the browser, would be structured the same (no shortcuts):
element
.querySelector('foo')
.shadowRoot
.querySelector('bar');
So maybe we just need to implement ShadowRoot
on WebElement
? Which can be null
(just like in the browser).
bennypowers, LucaMele, rgavriel, GitSIPA, MauriceWebb and 7 more
Metadata
Metadata
Assignees
Labels
A-needs decisionTLC needs to discuss and agreeTLC needs to discuss and agreeI-enhancementSomething could be betterSomething could be better