capybara-playwright-driver 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capybara/playwright/node.rb +11 -0
- data/lib/capybara/playwright/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6af9f6424fc2c8e2dc870b3f93c7c3a5b78d72b2b1919216a4ab6ea10d410315
|
4
|
+
data.tar.gz: 90c223a49a82c1c39599847de8fd1818ab901c6eca2918630e8e6f0d25a3d701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83de549842d4de5b036f57e3ebd3d009a94ae27c70c9724aa282bd0ecdafd1e2faacd7ce990ff0e837877606cc56453b9827199ed2afaff7a73c0cb97c4dea42
|
7
|
+
data.tar.gz: 314d3197acfd2098343d8edbb030cc87f424bf46db4d6ee0c4441eba5db3f4c75f772584769cd7e18028ef2547a8fb235452a23dd6dab1a0f8259c90fe6fd667
|
@@ -891,6 +891,17 @@ module Capybara
|
|
891
891
|
@element.dispatch_event(event)
|
892
892
|
end
|
893
893
|
|
894
|
+
def shadow_root
|
895
|
+
# Playwright does not distinguish shadow DOM.
|
896
|
+
# https://playwright.dev/docs/selectors#selecting-elements-in-shadow-dom
|
897
|
+
# Just do with Host element as shadow root Element.
|
898
|
+
#
|
899
|
+
# Node.new(@driver, @page, @element.evaluate_handle('el => el.shadowRoot'))
|
900
|
+
#
|
901
|
+
# does not work well because of the Playwright Error 'Element is not attached to the DOM'
|
902
|
+
self
|
903
|
+
end
|
904
|
+
|
894
905
|
def inspect
|
895
906
|
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
|
896
907
|
end
|