- 
 
 - 
  Notifications
 
You must be signed in to change notification settings  - Fork 97
 
Add initial support for shadow_root #234
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
Conversation
bff3d8f to
 ceb4f86  
 Compare
 
 
 
 
 
 tomdracz
 
 
 
 commented
 Mar 11, 2024 
 
 
 
FWIW I've been playing around fixing some Shadow DOM issue using https://github.com/yuki24/capybara-shadowdom It still didn't play ball with likes of clicks not working because of some overlapping element issues.
let element = node.getRootNode().elementFromPoint(x, y); in this PR seems to be the magic sauce so having this available would be neat
ceb4f86 to
 1578943  
 Compare
 
 
 
 
 
 boardfish
 
 
 
 commented
 Sep 16, 2024 
 
 
 
Hey! This fork has worked well for my use case – what else needs to be done to get it merged?
1578943 to
 9756aa7  
 Compare
 
 Unfortunately I don't know – I can only say that it's still working fine for me as well. Rebased, the spec failures are unrelated (and about to be fixed with #273).
 
 
 
 boardfish
 
 
 
 commented
 Sep 24, 2024 
 
 
 
Maybe it's worth rebasing this onto that branch and requesting a review from @/route once it's all green? Really like what you've done here, it'd be great to get it into Cuprite stable so that we can depend on it with confidence 🎉
Following capybara's support teamcapybara/capybara#2546
9756aa7 to
 22d9130  
 Compare
 
 
Capybara added support to access an element's shadow DOM with
Element#shadow_rootin teamcapybara/capybara#2546 – it would be nice if Cuprite supported it too.Here is an attempt at that. Not sure if it does everything as it should, but the specs are passing locally and I've used it successfully in a project's test suite where
The spec "produces error messages when failing" provided by Capybara needed to be adapted because the generated error message includes the value of
tagNamewhich is different between Selenium and Cuprite.The added spec "extends visibility check across shadow host boundary" covers a behaviour that Selenium implements this way: the visibility of the shadow propagates down to its children.