Skip to content

[🐛 Bug]: EventFiringWebDriver doesn't wrap ShadowRoot instance #12049

@mcichonqa

Description

@mcichonqa

What happened?

Im using EventFiringWebDriver instance for invoke some events like a listeners and all was very good until the moment when I got ShadowRoot instance. When I used GetShadowRoot().FindElement() returned instance is without any events so if some elements nested in shadow root cause some problems I will not see that.

Is there any way to achive these events inside shadow root element? Im not seeing similar class like EventFiringWebElement for wrap ShadowRoot.

How can we reproduce the issue?

IWebDriver searchContext = new EventFiringWebDriver(driver);
IWebElement parentElement = searchContext.FindElement(locator for parent element); <--- This will return EventFiringWebElement

ShadowRoot shadowRoot = parentElement.GetShadowRoot();
shadowRoot.FindElement(locator for child element); <--- This will return WebElement instance, but I expected something like EventFiringShadowRoot instance including events

Relevant log output

Empty

Operating System

Windows10

Selenium version

4.8.2

What are the browser(s) and version(s) where you see this issue?

Chrome 113.0.5672.93

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 113.0.5672.6300

Are you using Selenium Grid?

Tested without RemoteWebDriver

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-dotnet.NET BindingsI-defectSomething is not working as intendedR-help wantedIssues looking for contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions