reorder shadowroot removal#13800
Merged
christian-bromann merged 1 commit intowebdriverio:mainfrom Oct 25, 2024
Merged
Conversation
eslint-plugin-wdio
@wdio/appium-service
@wdio/allure-reporter
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/firefox-profile-service
@wdio/dot-reporter
@wdio/cucumber-framework
@wdio/jasmine-framework
@wdio/globals
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/reporter
@wdio/repl
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/spec-reporter
@wdio/sumologic-reporter
@wdio/static-server-service
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
webdriver
webdriverio
commit: |
christian-bromann
approved these changes
Oct 25, 2024
Member
christian-bromann
left a comment
There was a problem hiding this comment.
Love this ❤️ thanks so much!
Contributor
|
Hey ccharnkij 👋 Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Fix for #13521. So this happens due to the sequence in which shadowRoots are removed. Currently, shadowRoots that are duplicate can be added to the children set and are removed in a first-in-first-out fashion. In the reproducible, the shadowRoot needed to find the element is the child of the first shadowRoot added in the children set. This is followed by a duplicate and a removeShadowRoot entry, which fetches and removes that first child.
For example,
I fix this by changing the order when removing and make it remove the last one first. I test this with the reproducible example and it works. However, I'm not experienced in how bidi receives shadowRoots and not sure if the current way is the intended way (maybe should have discuss with you first on discord). Let me know how it goes, and if this is not valid, please close this.
Types of changes
Checklist
Reviewers: @webdriverio/project-committers