Class DOMSnapshot


  • @Beta
    public class DOMSnapshot
    extends java.lang.Object
    This domain facilitates obtaining document snapshots with DOM, layout, and style information.
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMSnapshot()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static org.openqa.selenium.devtools.Command<DOMSnapshot.CaptureSnapshotResponse> captureSnapshot​(java.util.List<java.lang.String> computedStyles, java.util.Optional<java.lang.Boolean> includePaintOrder, java.util.Optional<java.lang.Boolean> includeDOMRects)
      Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes.
      static org.openqa.selenium.devtools.Command<java.lang.Void> disable()
      Disables DOM snapshot agent for the given page.
      static org.openqa.selenium.devtools.Command<java.lang.Void> enable()
      Enables DOM snapshot agent for the given page.
      static org.openqa.selenium.devtools.Command<DOMSnapshot.GetSnapshotResponse> getSnapshot​(java.util.List<java.lang.String> computedStyleWhitelist, java.util.Optional<java.lang.Boolean> includeEventListeners, java.util.Optional<java.lang.Boolean> includePaintOrder, java.util.Optional<java.lang.Boolean> includeUserAgentShadowTree)
      Deprecated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DOMSnapshot

        public DOMSnapshot()
    • Method Detail

      • disable

        public static org.openqa.selenium.devtools.Command<java.lang.Void> disable()
        Disables DOM snapshot agent for the given page.
      • enable

        public static org.openqa.selenium.devtools.Command<java.lang.Void> enable()
        Enables DOM snapshot agent for the given page.
      • getSnapshot

        @Deprecated
        public static org.openqa.selenium.devtools.Command<DOMSnapshot.GetSnapshotResponse> getSnapshot​(java.util.List<java.lang.String> computedStyleWhitelist,
                                                                                                        java.util.Optional<java.lang.Boolean> includeEventListeners,
                                                                                                        java.util.Optional<java.lang.Boolean> includePaintOrder,
                                                                                                        java.util.Optional<java.lang.Boolean> includeUserAgentShadowTree)
        Deprecated.
        Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
      • captureSnapshot

        public static org.openqa.selenium.devtools.Command<DOMSnapshot.CaptureSnapshotResponse> captureSnapshot​(java.util.List<java.lang.String> computedStyles,
                                                                                                                java.util.Optional<java.lang.Boolean> includePaintOrder,
                                                                                                                java.util.Optional<java.lang.Boolean> includeDOMRects)
        Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.