-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] Webdriver can't return shadowRoot (as SearchContext) in Chrome96+ #99775
Comments
It seems that there has been a change in how Chrome 96+ retrieves the shadowRoot of an element.
Looking at the equivalent fix in Selenium, it seems that some of the changes need to happen in |
There might be a workaround by splitting the selection of the element that contains the shadow root, and the retrieval of the shadowRoot itself: WebElement shadowHost = seleniumWebDriver.findElement(By.cssSelector("#shadowrootcontainer"));
JavascriptExecutor javascriptExecutor = (JavascriptExecutor) seleniumWebDriver;
SearchContext shadowRoot = (SearchContext) javascriptExecutor.executeScript("return arguments[0].shadowRoot", shadowHost);
WebElement shadowContent = shadowRoot.findElement(By.cssSelector("#shadowcontentcss")); |
We should copy this issue into the |
Created google/webdriver.dart#247 |
Issue is assigned to multiple teams (ecosystem, web). Please ensure the issue has only one |
We're attempting to run some tests in Chrome96, and this bit of the code is failing:
flutter/examples/hello_world/test_driver/smoke_web_engine_test.dart
Lines 46 to 50 in 5e0cc4c
With the following error (complete build):
The text was updated successfully, but these errors were encountered: